get-iterator-method.js 343 B

1234567891011
  1. var classof = require('../internals/classof');
  2. var Iterators = require('../internals/iterators');
  3. var wellKnownSymbol = require('../internals/well-known-symbol');
  4. var ITERATOR = wellKnownSymbol('iterator');
  5. module.exports = function (it) {
  6. if (it != undefined) return it[ITERATOR]
  7. || it['@@iterator']
  8. || Iterators[classof(it)];
  9. };