You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

test.js 320B

1234567891011121314151617181920
  1. var isArray = require('./');
  2. var test = require('tape');
  3. test('is array', function(t){
  4. t.ok(isArray([]));
  5. t.notOk(isArray({}));
  6. t.notOk(isArray(null));
  7. t.notOk(isArray(false));
  8. var obj = {};
  9. obj[0] = true;
  10. t.notOk(isArray(obj));
  11. var arr = [];
  12. arr.foo = 'bar';
  13. t.ok(isArray(arr));
  14. t.end();
  15. });