@f/tap
v0.1.0
Published
Runs a given function with the supplied object, then returns the object
Downloads
9
Readme
tap
Runs a given function with the supplied object, then returns the object.
Installation
$ npm install @f/tap
Usage
var tap = require('@f/tap')
var log = tap(console.log.bind(console))
var ten = log(10)
// -> returns` you 10 and logs it
API
tap(fn)
fn
- Side effect function
Returns: A function which can be called with an argument to execute fn
and return the object
License
MIT