Add is.arrayLike() (#26)
This commit is contained in:
parent
0bafa04e77
commit
83adc096ef
3 changed files with 29 additions and 0 deletions
12
test.js
12
test.js
|
|
@ -392,6 +392,18 @@ test('is.typedArray', t => {
|
|||
t.false(m.typedArray({}));
|
||||
});
|
||||
|
||||
test('is.arrayLike', t => {
|
||||
(() => {
|
||||
t.true(m.arrayLike(arguments));
|
||||
})();
|
||||
t.true(m.arrayLike([]));
|
||||
t.true(m.arrayLike('unicorn'));
|
||||
|
||||
t.false(m.arrayLike({}));
|
||||
t.false(m.arrayLike(() => {}));
|
||||
t.false(m.arrayLike(new Map()));
|
||||
});
|
||||
|
||||
test('is.inRange', t => {
|
||||
const x = 3;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue