auto-ref

0.0.2 • Public • Published

auto-ref NPM version Build Status Dependency Status Coverage percentage

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

Package Sidebar

Install

npm i auto-ref

Weekly Downloads

4

Version

0.0.2

License

none

Last publish

Collaborators

  • blugavere