Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

error-if-not-array

writetome5144MIT2.0.0

Function triggers error if argument is not array

error, message, not, array, type-checking, type, check, data-type

readme

errorIfNotArray(arg): void

Triggers error "Input must be array" if arg is not array.

Installation

npm i error-if-not-array

Loading

import { errorIfNotArray } from 'error-if-not-array';