Skip to content

Instantly share code, notes, and snippets.

@watson
Created December 29, 2014 12:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save watson/faf74bf6fc6e46335330 to your computer and use it in GitHub Desktop.
Save watson/faf74bf6fc6e46335330 to your computer and use it in GitHub Desktop.
Node.js util.isArray implementation
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