0.3.0 • Published 8 years ago

industry-instance v0.3.0

Weekly downloads
1
License
MIT
Repository
github
Last release
8 years ago

IndustryInstance Build Status

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       // true
test("key").rand == test("key").rand  // true
test("key").rand == test().rand       // false
0.3.0

8 years ago

0.2.0

8 years ago

0.1.0

8 years ago

0.0.6

8 years ago

0.0.5

8 years ago

0.0.4

8 years ago

0.0.3

8 years ago