ngraph.expose

1.0.0 • Public • Published

ngraph.expose

Adds getters and setters to subset of object's properties

Build Status

Example

var target = {};
var source = { age: 42};
 
exposeProperties(source, target);
 
target.age(); // returns 42
target.age(24); // sets source.age to 24;
 

You can also select only subset of properties you want to expose:

var target = {};
var source = { age: 42, name: 'John'};
exposeProperties(source, target, ['name']);
target.name(); // returns 'John'
target.age === undefined; // true

install

With npm do:

npm install ngraph.expose

license

MIT

Readme

Keywords

Package Sidebar

Install

npm i ngraph.expose

Weekly Downloads

1,839

Version

1.0.0

License

MIT

Unpacked Size

5 kB

Total Files

6

Last publish

Collaborators

  • anvaka