Nourishing Plushie Monster

    industry-instance

    0.3.0 • Public • Published

    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

    Keywords

    none

    Install

    npm i industry-instance

    DownloadsWeekly Downloads

    1

    Version

    0.3.0

    License

    MIT

    Last publish

    Collaborators

    • winton