simple-getter-setter
v1.0.0
Published
simple getter-setter function.
Downloads
2
Readme
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"'