JSPM

is-function

1.0.2
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 5594383
  • Score
    100M100P100Q191317F
  • License MIT

is that thing a function? Use this module to find out

Package Exports

  • is-function

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (is-function) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

is-function

browser support

Is that thing a function? Use this module to find out.

API

module.exports = function isFunction(fn) -> Boolean

Return true if fn is a function, otherwise false.

Why not typeof fn === 'function'

Because certain old browsers misreport the type of RegExp objects as functions.

Acknowledgements

I stole this from https://github.com/ljharb/object-keys

License

MIT