private-accessor
v1.1.1
Published
Private variables for javascript
Downloads
293
Readme
private
Private variables for javascript
npm install --save private-accessor
Example Usage
var $private = require('private-accessor').createAccessor();
var foo = {bar: '3'};
$private(foo).secret = 3;
console.log(foo);
// { bar: '3' }
console.log($private(foo));
// { secret: 3 }