is-array-iterator-method.js 361 B

12345678910
  1. var wellKnownSymbol = require('../internals/well-known-symbol');
  2. var Iterators = require('../internals/iterators');
  3. var ITERATOR = wellKnownSymbol('iterator');
  4. var ArrayPrototype = Array.prototype;
  5. // check on default Array iterator
  6. module.exports = function (it) {
  7. return it !== undefined && (Iterators.Array === it || ArrayPrototype[ITERATOR] === it);
  8. };