@feizheng/next-instance

1.0.0 • Public • Published

next-instance

Create an instance without new.

version license size download

installation

npm install -S @feizheng/next-instance

usage

import '@feizheng/next-instance';

class Person {
  constructor(name, age) {
    this.name = name;
    this.age = age;
  }
}

const p1 = nx.instance(Person, 'fei', 100);
// Person { name: 'fei', age: 100 }

license

Code released under the MIT license.

Readme

Keywords

none

Package Sidebar

Install

npm i @feizheng/next-instance

Weekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

5.31 kB

Total Files

6

Last publish

Collaborators

  • afeiship