error-if-not-function
v1.0.0
Published
Function triggers error if argument is not type 'function'
Downloads
8
Maintainers
Readme
errorIfNotFunction(arg): void
Triggers error if arg
is not a function.
Example
errorIfNotFunction(false);
// Error: "Input must be function"
Installation
npm i error-if-not-function
Loading
// if using TypeScript:
import { errorIfNotFunction } from 'error-if-not-function';
// if using ES5 JavaScript:
var errorIfNotFunction = require('error-if-not-function').errorIfNotFunction;