Skip to content

heycalmdown/virtualproperty

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published