is-arrayish
Advanced tools
Comparing version
'use strict'; | ||
module.exports = function isArrayish(obj) { | ||
return obj instanceof Array || Array.isArray(obj); | ||
return obj instanceof Array || Array.isArray(obj) || | ||
(obj.length >= 0 && obj.splice instanceof Function); | ||
}; |
{ | ||
"name": "is-arrayish", | ||
"description": "Determines if an object can be used as an array", | ||
"version": "0.1.1", | ||
"version": "0.2.0", | ||
"author": "Qix (http://github.com/qix-)", | ||
@@ -6,0 +6,0 @@ "keywords": [ |
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
3298
1.76%5
25%