Wondering what’s next for npm?Check out our public roadmap! »

    is-fn

    2.0.0 • Public • Published

    is-fn Build Status

    Check if a value is a function

    In Node.js, just use typeof fn which works exactly the same. This module can be useful in the browser where typeof fn has a myriad of bugs.

    Install

    $ npm install is-fn
    

    Usage

    const isFn = require('is-fn');
     
    isFn(() => {});
    //=> true
     
    isFn('unicorn');
    //=> false

    Related

    License

    MIT © Sindre Sorhus

    Install

    npm i is-fn

    DownloadsWeekly Downloads

    73,268

    Version

    2.0.0

    License

    MIT

    Unpacked Size

    2.57 kB

    Total Files

    4

    Last publish

    Collaborators

    • avatar