source: trip-planner-front/node_modules/isarray/test.js@ 6a3a178

Last change on this file since 6a3a178 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 320 bytes
Line 
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
Note: See TracBrowser for help on using the repository browser.