get-async-iterator-method.js 326 B

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