@f/is-functor

1.0.0 • Public • Published

is-functor

Build status Git tag NPM version Code style

Check if looks like a functor (implments map).

Installation

$ npm install @f/is-functor

Usage

var isFunctor = require('@f/is-functor')

isFunctor([]) // => true
isFunctor({}) // => false
isFunctor(Object.create({map: function () {}})) // => true

API

isFunctor(ob)

  • obj - object to check

Returns: boolean indicating whether obj is a functor

License

MIT

/@f/is-functor/

    Package Sidebar

    Install

    npm i @f/is-functor

    Weekly Downloads

    51

    Version

    1.0.0

    License

    MIT

    Last publish

    Collaborators

    • f