0.2.1 • Published 11 years ago

getter-setter v0.2.1

Weekly downloads
2
License
-
Repository
github
Last release
11 years ago

getter-setter

2 methods for decorating objects with getters and setters:

  1. proto method (only works in node.js or v8 browsers)
  2. underscore extend method (works in all browsers as well as node.js)

Examples

// or with ...extend does the same thing
// var decorate = require('getter-setter').extend;

var decorate = require('getter-setter').proto;
var obj = {
	hello: 'world'
};

decorate(obj);

// outputs "world"
console.log("obj.get('hello')");
0.2.1

11 years ago

0.2.0

11 years ago

0.1.4

11 years ago

0.1.3

11 years ago

0.1.2

11 years ago

0.1.1

11 years ago

0.1.0

11 years ago

0.0.1

11 years ago