is-any-array
Advanced tools
Comparing version 0.0.2 to 0.0.3
@@ -0,1 +1,6 @@ | ||
<a name="0.0.3"></a> | ||
## [0.0.3](https://github.com/cheminfo-js/is-any-array/compare/v0.0.2...v0.0.3) (2018-10-26) | ||
<a name="0.0.2"></a> | ||
@@ -2,0 +7,0 @@ ## 0.0.2 (2018-10-26) |
{ | ||
"name": "is-any-array", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"description": "Check if toString.call ends with Array", | ||
@@ -5,0 +5,0 @@ "main": "./src/index.js", |
@@ -10,4 +10,5 @@ 'use strict'; | ||
expect(isAnyArray([])).toBe(true); | ||
expect(isAnyArray([1, 2, 3])).toBe(true); | ||
expect(isAnyArray(new Uint16Array(2))).toBe(true); | ||
}); |
'use strict'; | ||
const toString = Object.prototype.toString; | ||
function isAnyArray(object) { | ||
@@ -4,0 +6,0 @@ return toString.call(object).endsWith('Array]'); |
4219
16