debian-mirror-gitlab/core-js/internals/get-async-iterator-method.js
2019-10-31 01:37:42 +05:30

9 lines
326 B
JavaScript

var getIteratorMethod = require('../internals/get-iterator-method');
var wellKnownSymbol = require('../internals/well-known-symbol');
var ASYNC_ITERATOR = wellKnownSymbol('asyncIterator');
module.exports = function (it) {
var method = it[ASYNC_ITERATOR];
return method === undefined ? getIteratorMethod(it) : method;
};