error-if-not-function

1.0.0 • Public • Published

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;

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i error-if-not-function

      Weekly Downloads

      1

      Version

      1.0.0

      License

      MIT

      Unpacked Size

      2.47 kB

      Total Files

      4

      Last publish

      Collaborators

      • writetome51