Created
December 29, 2014 12:06
-
-
Save watson/faf74bf6fc6e46335330 to your computer and use it in GitHub Desktop.
Node.js util.isArray implementation
This file contains 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
function isArray(ar) { | |
return Array.isArray(ar) || | |
(typeof ar === 'object' && objectToString(ar) === '[object Array]'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment