auto-ref
v0.0.2
Published
Automatically create references to constructor arguments.
Downloads
3
Maintainers
Readme
auto-ref
Automatically create references to constructor arguments.
Installation
$ npm install --save auto-ref
Usage
const autoRef = require('auto-ref');
class Service {
constructor(repo, baz) { // eslint-disable-line no-unused-vars
autoRef(this, arguments);
}
}
const service = new Service('foo', 'bar');
console.log(service.repo); // => 'foo'
console.log(service.baz); // => 'bar'
License
Apache-2.0 © Ben Lugavere