0.1.0 • Published 8 years ago

@f/tap v0.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
8 years ago

tap

Build status Git tag NPM version Code style

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