node package manager
Easy sharing. Manage teams and permissions with one click. Create a free org »

factories

factories = require("./src")
 
classFactory = factories.class SomeClass
someClassInstance = classFactory.create data
 
fnFactory    = factories.fn (data) -> data
fnInstance   = fnInstance.create data
 
# resolve the factory depending on the type 
factory      = factories.factory SomeClass
someClassInstance = factory.create data