@bemoje/assert-array-like
v1.0.1
Published
Throw TypeError if not a value is array-like. The undefined value always evaluates to true.
Downloads
1
Maintainers
Readme
@bemoje/assert-array-like
Throw TypeError if not a value is array-like. The undefined value always evaluates to true.
Version
Travis CI
Dependencies
Stats
Donate
Installation
npm install @bemoje/assert-array-like
npm install --save @bemoje/assert-array-like
npm install --save-dev @bemoje/assert-array-like
Usage
import assertArrayLike from '@bemoje/assert-array-like'
assertArrayLike([])
//=> void
assertArrayLike(new Uint16Array())
//=> void
//assertArrayLike({})
//=> throw TypeError
Tests
Uses Jest to test module functionality. Run tests to get coverage details.
npm run test
API
Table of Contents
assertArrayLike
Throw TypeError if not a value is array-like. The undefined value always evaluates to true.
Parameters
value
any The value
Returns void