justo-injector

Dependency injector.

Showing:

Popularity

Downloads/wk

5

GitHub Stars

1

Maintenance

Last Commit

6yrs ago

Contributors

3

Package

Dependencies

0

Size (min+gzip)

0.4KB

License

Type Definitions

Tree-Shakeable

No?

Categories

Readme

Build Status

Dependency injector.

Proudly made with ♥ in Valencia, Spain, EU.

Functions

hasParameter()

Checks whether a function has a specified parameter:

hasParameter(name : string, fn : function) : boolean

getParameters()

Returns an array with the parameters:

getParameters(fn : function) : string[]

getParameterIndex()

Returns the parameter index:

getParameterIndex(name : string, fn : function) : number

inject()

Returns the argument array for a call:

inject(args : object, fn : function) : object[]

Example:

function fn(x, y, z) {}

args = inject({x: 1, y: 2}, fn);  //[1, 2, undefined]

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100