binded
binded methods as pure functions
Install
npm install --save binded
Usage
; const log warn = ;const resolve reject all = ; // unicorns ; /* { log: [Function: bound bound ], info: [Function: bound bound ], warn: [Function: bound bound ], error: [Function: bound bound ], dir: [Function: bound bound ], time: [Function: bound bound ], timeEnd: [Function: bound bound ], trace: [Function: bound bound trace], assert: [Function: bound bound ], Console: [Function: bound Console] } */ ; /* { resolve: [Function: bound resolve], all: [Function: bound all], race: [Function: bound race], reject: [Function: bound reject] } */
API
binded(input)
Return an Object with functions of methods binded to input, so you can use log
from console
without it throwing an Error
.
input
Required
Type: Function
or Object
Function Constructor or an Object.
License
MIT © Vladimir Starkov