@bemoje/is-function

Returns true if the argument is a function; false otherwise.

Usage no npm install needed!

<script type="module">
  import bemojeIsFunction from 'https://cdn.skypack.dev/@bemoje/is-function';
</script>

README

@bemoje/is-function

Returns true if the argument is a function; false otherwise.

Version

NPM version

Travis CI

dependencies

Dependencies

dependencies

Stats

NPM downloads Forks

Donate

Buy Me A Beer donate button PayPal donate button

Installation

npm install @bemoje/is-function
npm install --save @bemoje/is-function
npm install --save-dev @bemoje/is-function

Usage

import isFunction from '@bemoje/is-function'

isFunction(function () {})
//=> true

isFunction(class {})
//=> true

isFunction(() => {})
//=> true

isFunction()
//=> false

isFunction('a')
//=> false

isFunction(1)
//=> false

Tests

Uses Jest to test module functionality. Run tests to get coverage details.

npm run test

API

isFunction

Returns

true if the argument is a function; false otherwise.

Parameters
  • value any The value to evaluate
Returns

boolean