npm.io
3.0.0 • Published 5 years ago

is-fn v3.0.0

Weekly downloads
56,233
License
MIT
Repository
github
Last release
5 years ago

is-fn

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

import isFunction from 'is-fn';

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

isFunction('unicorn');
//=> false

Related

  • @sindresorhus/is - Type check values
functionfncheckdetectistesttype
@infinitebrahmanuniverse/nolb-is-f@everything-registry/sub-chunk-1933install-iskafirchain-tetrislazy-eval-arraygulp-modify-css-urls@thismr/bitmindtest-core@xswap/v2-coreexpress-final-text-response-pmbfnvlconcise-value-preview-pmbbcs-kitbullet-catcherubborg-sysfacts-helper-pmbubborg-planner-pmbubborg-playbookie-pmbp360p-seqpromise-to-callbackremove-methodsnode-matrix-assetspify-all-methods-pmbproxify-objectspromisify-selected-methodsretry-fnsindresorhus.js@kodinghandle/bullswap-lib@sudophunk/fulido@litedexdev/litedex-core-swap@olympfin/olymp-swap-lib@afria/afria-libraries@aligov/search-table@bonsaiswapv3/core@bonsaiswapv3/deploy@bonsaiswap-lib/lib@chakra-swap/core@borealisswap/borealis-swap-lib@eliteswap/v2-core@igniswap/igni-swap-lib@innoswap/core@materia-dex/materia-contracts-proxy
3.0.0

5 years ago

2.0.0

7 years ago

1.0.0

10 years ago

contact@npm.io