|
Last change
on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 11 days ago |
|
Fix frontend appearance
|
-
Property mode
set to
100644
|
|
File size:
641 bytes
|
| Line | |
|---|
| 1 | 'use strict';
|
|---|
| 2 | var $ = require('../internals/export');
|
|---|
| 3 | var anObject = require('../internals/an-object');
|
|---|
| 4 | var AsyncFromSyncIterator = require('../internals/async-from-sync-iterator');
|
|---|
| 5 | var WrapAsyncIterator = require('../internals/async-iterator-wrap');
|
|---|
| 6 | var getIteratorDirect = require('../internals/get-iterator-direct');
|
|---|
| 7 |
|
|---|
| 8 | // `Iterator.prototype.toAsync` method
|
|---|
| 9 | // https://github.com/tc39/proposal-async-iterator-helpers
|
|---|
| 10 | $({ target: 'Iterator', proto: true, real: true, forced: true }, {
|
|---|
| 11 | toAsync: function toAsync() {
|
|---|
| 12 | return new WrapAsyncIterator(getIteratorDirect(new AsyncFromSyncIterator(getIteratorDirect(anObject(this)))));
|
|---|
| 13 | }
|
|---|
| 14 | });
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.