is-array-iterator-method.js 375 B

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