1.0.0 • Published 5 years ago

error-if-not-function v1.0.0

Weekly downloads
3
License
MIT
Repository
github
Last release
5 years ago

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;