ngraph.expose

v0.0.0
Adds getters and setters to subeset of object's properties
util properties

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

Metadata

  • MIT
  • Whatever
  • Andrei Kashcha
  • released 1/19/2014

Downloads

Maintainers