Sha256: ea5309e14a88a04e63fdebaca619bdfcf2ba2552a8274c40d0b463018daa3663
Contents?: true
Size: 682 Bytes
Versions: 19
Compression:
Stored size: 682 Bytes
Contents
import { test } from '../qunit'; import isArray from '../../lib/utils/is-array.js'; test('isArray recognizes Array objects', function (assert) { assert.ok(isArray([1, 2, 3]), 'array args'); assert.ok(isArray([]), 'empty array'); assert.ok(isArray(new Array(1, 2, 3)), 'array constructor'); }); test('isArray rejects non-Array objects', function (assert) { assert.ok(!isArray(), 'nothing'); assert.ok(!isArray(undefined), 'undefined'); assert.ok(!isArray(null), 'null'); assert.ok(!isArray(123), 'number'); assert.ok(!isArray('[1,2,3]'), 'string'); assert.ok(!isArray(new Date()), 'date'); assert.ok(!isArray({ a: 1, b: 2 }), 'object'); });
Version data entries
19 entries across 19 versions & 1 rubygems