Created
June 9, 2011 03:37
-
-
Save huobazi/1016000 to your computer and use it in GitHub Desktop.
javascript isArray
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var _isArray = function (obj) { | |
return obj && | |
typeof obj === 'object' && | |
typeof obj.length === 'number' && | |
typeof obj.splice === 'function' && | |
!(obj.propertyIsEnumerable('length')); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment