0.0.2 • Published 7 years ago
auto-ref v0.0.2
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