freight.js
Version:
An simple CommonJS dependency injection container for both node.js and the browser (using browserify)
31 lines (27 loc) • 649 B
JSON
{
"castle_fret": {
"shared": true,
"constructorFn": ":castle.class",
"arguments": [":sir_freight", [":tower", ":tower", [":tower", ":tower"]]],
"tags": ["inanimate", "building"]
},
"sir_freight": {
"shared": true,
"constructorFn": ":knight.class",
"arguments": ["Sir Freight", ":sword", {
"strength": 40,
"dexterity": 100,
"quest": ":knight.quest",
"tower": ":tower"
}]
},
"sword": {
"factoryFn": ":sword.factory",
"tags": ["inanimate"]
},
"tower": {
"constructorFn": ":tower.class",
"arguments": [":tower.height"],
"tags": ["inanimate", "building"]
}
}