npm.io
1.0.0 • Published 10 years ago

pare

Licence
MIT
Version
1.0.0
Deps
0
Vulns
0
Weekly
0
Stars
2

pare Build Status

Compare a function input against the previous input value

Install

$ npm install --save pare

Usage

var compare = require('pare')
var fn = compare(function (a, b) {
  //=> null, 1
  //=> 1, 2   
})

fn(1)
fn(2)

API

compare(fn) -> function
fn

Required
Type: function

Returns a single-argument function wrapper around an inner comparison function (fn).

License

MIT Ben Drucker

Keywords