core.get-iterator.js 296 B

1234567
  1. var anObject = require('./_an-object');
  2. var get = require('./core.get-iterator-method');
  3. module.exports = require('./_core').getIterator = function (it) {
  4. var iterFn = get(it);
  5. if (typeof iterFn != 'function') throw TypeError(it + ' is not iterable!');
  6. return anObject(iterFn.call(it));
  7. };