0.2.5 • Published 7 years ago

lightject v0.2.5

Weekly downloads
3
License
MIT
Repository
github
Last release
7 years ago

Codacy NodeSecurity

npm install lightject

require("lightject")

let ctx = {
        "payload": "!"
    };

let binds = {
        "myBind": "?"
    };

let data = {
        "myBind": "Replace!",

        "input":  "Simple start",
        "output": console.log
    };

let print;

//-------------]>

$injector
    .value("x", 0)
    .service("y", function(x) { this.v = 1 + x; })
    .factory("z", function(x, y) { return {"v": 3 + x + y.v}; });
    
print = $injector(fLog, binds);
print(data, ctx);

$injector.run(fLog, data, ctx);
$injector.run(["x", "y", function(d1, d2) { return d1 + d2.v; }]);

//-------------]>

function fLog(input, output, myBind) {
    output(input + this.payload + myBind);
}
  • Coverage: +
  • Benchmark: +
  • Browser: +
  • valueOf/toString: +

Module

MethodArgumentsReturn
-
createInstancethis
-
onCallercallback(name, data, ctx)this or exception
-
valuename, valuethis
servicename, functhis
factoryname, functhis
-
tabletable, bindstable or null
-
runf, data, ctxresult of a function or null
runTabletable, data, ctxtable or null
execTabletable, data, ctxoverwritten table or null

System variables

NameDesc
$in

License

MIT


@ Daeren Torn

0.2.5

7 years ago

0.2.4

7 years ago

0.2.3

8 years ago

0.2.2

8 years ago

0.2.1

8 years ago

0.2.0

8 years ago

0.1.0

8 years ago

0.0.13

8 years ago

0.0.12

8 years ago

0.0.11

8 years ago

0.0.10

8 years ago

0.0.9

8 years ago

0.0.8

8 years ago

0.0.7

9 years ago

0.0.6

9 years ago

0.0.5

9 years ago

0.0.4

9 years ago

0.0.3

9 years ago

0.0.2

9 years ago

0.0.1

9 years ago