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
Versions
Current Tags
- VersionDownloads (Last 7 Days)
- 0.3.0
1
Version History
Package Sidebar
Install
Weekly Downloads