1.0.0 • Published 8 years ago
simple-getter-setter v1.0.0
simple-getter-setter.js
The simple getter-setter function. This library is inspired to the Mithril.js's m.prop function.
Install
$ npm install simple-getter-setter
$ bower install simple-getter-setter
Example
const prop = require('simple-getter-setter');
const name = prop('foo');
name(); // foo
name('bar'); // bar
name(); // bar
JSON.stringify(name); // '"bar"'
LICENCE
1.0.0
8 years ago