error-if-not-primitive-or-array
v1.0.3
Published
Function triggers error if argument is neither a primitive type or array
Downloads
13
Maintainers
Readme
errorIfNotPrimitiveOrArray(arg): void
Triggers a fatal error if arg
is not a primitive (number, boolean, or string)
or array.
Installation
npm i error-if-not-primitive-or-array
Loading
// if using TypeScript:
import {errorIfNotPrimitiveOrArray} from 'error-if-not-primitive-or-array';
// if using ES5 JavaScript:
var errorIfNotPrimitiveOrArray =
require('error-if-not-primitive-or-array').errorIfNotPrimitiveOrArray;