"Fossies" - the Fresh Open Source Software Archive

Member "Atom/resources/app/apm/node_modules/sha/node_modules/isarray/test.js" (7 Feb 2017, 320 Bytes) of archive /windows/misc/atom-windows.zip:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Javascript source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 var isArray = require('./');
    2 var test = require('tape');
    3 
    4 test('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