virtualproperty

0.1.0 • Public • Published

virtualproperty

build status

Make your simple object to get power of virtual getter or setter like Python do with set get.

Installation

$ npm install virtualproperty

Example

var virtualproperty = require('virtualproperty');
var a = virtualproperty.expose();
a.prototype.__get__ = function (key) {
  return 'a';
};

assert(a.a === 'a');
assert(a.b === 'a');

Running tests

Install dev deps

$ npm install -d

Run the tests

$ npm test

License

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i virtualproperty

Weekly Downloads

1

Version

0.1.0

License

none

Last publish

Collaborators

  • heycalmdown