package
Assert that a value is a function
npm install assert-functionGitHub-flavored package documentation.
Across all versions.
Download trend unavailable.
Runtime metadata.
Tagged topics.
Assert that a value is a function
$ npm install --save assert-functionvar assertFunction = require('assert-function')
assertFunction(function () {})
//=> noop
assertFunction('foo')
// => TypeError: Expected function, got: fooassertFunction(value) -> undefinedRequired
Type: any
A value to check. A TypeError is throw for non-function values.
MIT © Ben Drucker