### methodinjector

`1.0.1`
Need help reading this?

### Injector

Injector

Contains inject and cleanup methods

new Injector()
Static Members
▸ INJECT_BEFORE

Predefined inject before

INJECT_BEFORE
Parameters
INJECT_BEFORE `(int)` predefined value
▸ INJECT_AFTER

Predefined inject after

INJECT_AFTER
Parameters
INJECT_AFTER `(int)` predefined value
▸ injectBefore(method, inject)

Inject before

injectBefore(method: Function, inject: Function): Function
Parameters
method `(Function)` original method or launch method
inject `(Function)` inject method
Returns
`Function`: launch launch method
▸ injectAfter(method, inject)

Inject after

injectAfter(method: Function, inject: Function): Function
Parameters
method `(Function)` original method or launch method
inject `(Function)` inject method
Returns
`Function`: launch launch method
▸ inject(method, inject, beforeOrAfter)

Inject before or after

inject(method: Function, inject: Function, beforeOrAfter: int): Function
Parameters
method `(Function)` original method or launch method
inject `(Function)` inject method
beforeOrAfter `(int = `0`)` 0 - before, 1 - is after
Returns
`Function`: launch launch method
▸ remove(method, remove, launch, inject)

Remove injection

remove(method: any, remove: any, launch: Function, inject: Function): Function
Parameters
method `(any)`
remove `(any)`
launch `(Function)` method
inject `(Function)` inject method
Returns
`Function`: launch launch method
▸ reset(method, launch)

Resets launch and all injections

reset(method: any, launch: Function): Function
Parameters
method `(any)`
launch `(Function)` launch method
Returns
`Function`: original original method
▸ _toLauncher(method)

Converts original to launch

_toLauncher(method: Function): Launcher
Parameters
method `(Function)` original method or launch method
Returns
`Launcher`: launcher launcher
▸ _locate(method)

Locates launcher by launch method

_locate(method: Function): Launcher
Parameters
method `(Function)` launch method
Returns
`Launcher`: launcher launcher

### Launcher

Launcher

Launcher class. Keeps original method and injections.

new Launcher(original: Function)
Parameters
original `(Function)` original function
Instance Members
▸ constructor(original)

Task constructor

constructor(original: Function)
Parameters
original `(Function)` original function
▸ launch(args, any)

Launches

Runs the original function and all the injections. Tries to combine arguments and keeps the changes

launch(args: ...any, any: any): any
Parameters
args `(...any)`
any `(any)` any arguments
Returns
`any`: any any result from original function