UNPKG

367 BJavaScriptView Raw
1'use strict';
2var call = require('../internals/function-call');
3var map = require('../internals/async-iterator-map');
4
5var callback = function (value, counter) {
6 return [counter, value];
7};
8
9// `AsyncIterator.prototype.indexed` method
10// https://github.com/tc39/proposal-iterator-helpers
11module.exports = function indexed() {
12 return call(map, this, callback);
13};