negate
negates a function
Last updated 6 years ago by mattdesl .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install negate 
SYNC missed versions from official npm registry.

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.

Current Tags

  • 1.0.0                                ...           latest (6 years ago)

1 Versions

  • 1.0.0                                ...           6 years ago
Maintainers (1)
Downloads
Today 0
This Week 1
This Month 1
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (1)

Copyright 2014 - 2017 © taobao.org |