bound-call

0.0.0ย โ€ขย Publicย โ€ขย Published

bound-call

๐Ÿ‘” Create a bound call where you can pass "this" context as an argument

constย boundย =ย require('bound-call');
ย 
constย toLowerCaseย =ย bound('',ย 'toLowerCase');
ย 
['Hello',ย 'World'].map(toLowerCase);ย //ย ['hello',ย 'world']

Transpiled version

Environments which exclude node_modules from the transpiling pipeline should include the "browser" entry instead of "main". This exposes an ES5 commonjs module.

Also available for explicit import:

constย boundย =ย require('bound-call/dist');

Package Sidebar

Install

npm i bound-call

Weekly Downloads

0

Version

0.0.0

License

MIT

Unpacked Size

1.89 kB

Total Files

4

Last publish

Collaborators

  • omrilotan