negate

1.0.0 • Public • Published

negate

frozen

Returns a negated version of the given function.

var negate = require('negate')
 
function positive(n) {
    return n > 0
}
 
var negative = negate(positive)
 
negative(-50) === true

Usage

NPM

negate(fn)

Returns the negated version of fn.

License

MIT, see LICENSE.md for details.

Package Sidebar

Install

npm i negate

Weekly Downloads

18

Version

1.0.0

License

MIT

Last publish

Collaborators

  • mattdesl