Skip to content

anvaka/ngraph.expose

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Adds getters and setters to subeset of object's properties

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published