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.

    Install

    npm i negate

    DownloadsWeekly Downloads

    24

    Version

    1.0.0

    License

    MIT

    Last publish

    Collaborators

    • avatar