debian-mirror-gitlab/core-js/internals/get-iterator-method.js
2019-09-25 13:30:05 +05:30

11 lines
343 B
JavaScript

var classof = require('../internals/classof');
var Iterators = require('../internals/iterators');
var wellKnownSymbol = require('../internals/well-known-symbol');
var ITERATOR = wellKnownSymbol('iterator');
module.exports = function (it) {
if (it != undefined) return it[ITERATOR]
|| it['@@iterator']
|| Iterators[classof(it)];
};