@ndhoule/invoker

2.0.0 • Public • Published

invoker CI

Creates a function that invokes a given method.

Installation

$ component install ndhoule/invoker
$ npm install @ndhoule/invoker

API

invoker(method : Function|string) => Function(receiver, ...args)

Accepts a method name or a function, and returns a function that invokes that method on a receiver.

var map = invoker('map');
map([1, 2, 3], function(num) {
  return num + 1;
});
//=> [2, 3, 4]

License

Released under the MIT license.

Readme

Keywords

Package Sidebar

Install

npm i @ndhoule/invoker

Weekly Downloads

1

Version

2.0.0

License

MIT

Last publish

Collaborators

  • ndhoule