Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Array.of for older browsers and node compat.
JavaScript
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
.gitignore
LICENSE
README.md
index.js
package.json
test.js

README.md

arrayof

Array.of for older browsers and node compat.

browser support

npm install arrayof
var test = require('tape');
var arrayOf = require('arrayof');
test('Array#of Exists', function (t) {
    t.assert(Array.of !== undefined);
    t.end();
});


test('Array.of returns the correct array', function(t) {
    var expect = [1,2,{name: 'michael'}, 3, 4];

    var result = Array.of(1,2,{name: 'michael'}, 3, 4);

    t.same(result, expect);
    t.end();
});

test('arrayOf return the correct array', function(t) {
    var expect = [1,2,{name: 'michael'}, 3, 4];

    var result = arrayOf(1,2,{name: 'michael'}, 3, 4);

    t.same(result, expect);
    t.end();
});

Bitdeli Badge

Something went wrong with that request. Please try again.