Have ideas to improve npm?Join in the discussion! »

    array.of

    1.0.0 • Public • Published

    array.of Version Badge

    Build Status dependency status dev dependency status License Downloads

    npm badge

    An ES2015 spec-compliant Array.of shim. Invoke its "shim" method to shim Array.of if it is unavailable or noncompliant.

    This package implements the es-shim API interface. It works in an ES3-supported environment and complies with the spec.

    Most common usage:

    var assert = require('assert');
    var arrayOf = require('array.of');
     
    assert.deepEqual(arrayOf(1, 2, 3), [1, 2, 3]);
     
    if (!Array.of) {
        arrayOf.shim();
    }
     
    assert.deepEqual(Array.of(1, 2, 3), [1, 2, 3]);

    Tests

    Simply clone the repo, npm install, and run npm test

    Author

    twitter/mathias
    Mathias Bynens

    Install

    npm i array.of

    DownloadsWeekly Downloads

    1,404

    Version

    1.0.0

    License

    MIT

    Unpacked Size

    19.4 kB

    Total Files

    17

    Last publish

    Collaborators

    • avatar
    • avatar