Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Sign in / Register
T
topic1-63
  • Project
    • Project
    • Details
    • Activity
    • Cycle Analytics
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
  • Issues 0
    • Issues 0
    • List
    • Board
    • Labels
    • Milestones
  • Merge Requests 0
    • Merge Requests 0
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Packages
    • Packages
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Natthaphong Malaphan
  • topic1-63
  • Repository

Switch branch/tag
  • topic-1-63
  • 15-july
  • csubuapp-0501
  • node_modules
  • isarray
  • test.js
Find file
BlameHistoryPermalink
  • Natthaphong Malaphan's avatar
    week 4 good · c81ba88f
    Natthaphong Malaphan authored 4 years ago
    c81ba88f
test.js 320 Bytes
EditWeb IDE
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
var isArray = require('./');
var test = require('tape');

test('is array', function(t){
  t.ok(isArray([]));
  t.notOk(isArray({}));
  t.notOk(isArray(null));
  t.notOk(isArray(false));

  var obj = {};
  obj[0] = true;
  t.notOk(isArray(obj));

  var arr = [];
  arr.foo = 'bar';
  t.ok(isArray(arr));

  t.end();
});

Replace test.js

Attach a file by drag & drop or click to upload


Cancel
A new branch will be created in your fork and a new merge request will be started.