Skip to content

Instantly share code, notes, and snippets.

@dSalieri
Last active August 23, 2021 04:03
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 dSalieri/13688ad704e35b1c69c1699091c2bda6 to your computer and use it in GitHub Desktop.
Save dSalieri/13688ad704e35b1c69c1699091c2bda6 to your computer and use it in GitHub Desktop.
Returns true/false if object has iterator in prototype
function hasPrototypeIterator(o){
return o != null ? Object.hasOwnProperty.call(Object.getPrototypeOf(o), Symbol.iterator) : null;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment