CoolFace
Apppublic

Pinsave/counterstrike

sourceHugging Faceupdated 3mo agoView on Hugging Face
1likes
test.js21 linesDownload Raw Back to isarray
1var isArray = require('./');2var test = require('tape');3 4test('is array', function(t){5  t.ok(isArray([]));6  t.notOk(isArray({}));7  t.notOk(isArray(null));8  t.notOk(isArray(false));9 10  var obj = {};11  obj[0] = true;12  t.notOk(isArray(obj));13 14  var arr = [];15  arr.foo = 'bar';16  t.ok(isArray(arr));17 18  t.end();19});20 21