Skip to content

Instantly share code, notes, and snippets.

@kkoziarski
Created November 28, 2014 11:16
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 kkoziarski/ab79b1bf5ea1a9d321e5 to your computer and use it in GitHub Desktop.
Save kkoziarski/ab79b1bf5ea1a9d321e5 to your computer and use it in GitHub Desktop.
isArray - The Good Parts
var isArray = function (value) {
return value &&
typeof value === 'object' &&
typeof value.length === 'number' &&
typeof value.splice === 'function' &&
!(value.propertyIsEnumerable('length'));
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment