Assert that a value is a function
Install
$ npm install --save assert-function
Usage
var assertFunction = require('assert-function')
assertFunction(function () {})
//=> noop
assertFunction('foo')
// => TypeError: Expected function, got: foo
API
assertFunction(value)
-> undefined
value
RequiredType:
any
A value to check. A
TypeError
is throw for non-function values.