@bemoje/assert-array-like

    1.0.0 • Public • Published

    @bemoje/assert-array-like

    Throw TypeError if not a value is array-like. The undefined value always evaluates to true.

    Version

    NPM version

    Travis CI

    dependencies

    Dependencies

    dependencies

    Stats

    NPM downloads Forks

    Donate

    Buy Me A Beer donate button PayPal donate button

    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

    Install

    npm i @bemoje/assert-array-like

    DownloadsWeekly Downloads

    3

    Version

    1.0.0

    License

    MIT

    Unpacked Size

    8.19 kB

    Total Files

    5

    Last publish

    Collaborators

    • bemoje