0.0.2 • Published 7 years ago

auto-ref v0.0.2

Weekly downloads
11
License
-
Repository
github
Last release
7 years ago

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