industry-instance
0.3.0 • Public • Published IndustryInstance
Defines a factory function that builds instances.
Usage
import { factory } from "industry"
import { instance } from "industry-instance"
class Test {
constructor() {
this.rand = Math.random()
}
}
let test = factory(Test)
.set("instance", instance)
test().rand == test().rand
test("key").rand == test("key").rand
test("key").rand == test().rand
Readme
Keywords
nonePackage Sidebar
Install
Weekly Downloads