Last change
on this file since 6a3a178 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
1.1 KB
|
Line | |
---|
1 | 'use strict';
|
---|
2 | // https://github.com/tc39/proposal-iterator-helpers
|
---|
3 | var $ = require('../internals/export');
|
---|
4 | var anInstance = require('../internals/an-instance');
|
---|
5 | var createNonEnumerableProperty = require('../internals/create-non-enumerable-property');
|
---|
6 | var has = require('../internals/has');
|
---|
7 | var wellKnownSymbol = require('../internals/well-known-symbol');
|
---|
8 | var AsyncIteratorPrototype = require('../internals/async-iterator-prototype');
|
---|
9 | var IS_PURE = require('../internals/is-pure');
|
---|
10 |
|
---|
11 | var TO_STRING_TAG = wellKnownSymbol('toStringTag');
|
---|
12 |
|
---|
13 | var AsyncIteratorConstructor = function AsyncIterator() {
|
---|
14 | anInstance(this, AsyncIteratorConstructor);
|
---|
15 | };
|
---|
16 |
|
---|
17 | AsyncIteratorConstructor.prototype = AsyncIteratorPrototype;
|
---|
18 |
|
---|
19 | if (!has(AsyncIteratorPrototype, TO_STRING_TAG)) {
|
---|
20 | createNonEnumerableProperty(AsyncIteratorPrototype, TO_STRING_TAG, 'AsyncIterator');
|
---|
21 | }
|
---|
22 |
|
---|
23 | if (!has(AsyncIteratorPrototype, 'constructor') || AsyncIteratorPrototype.constructor === Object) {
|
---|
24 | createNonEnumerableProperty(AsyncIteratorPrototype, 'constructor', AsyncIteratorConstructor);
|
---|
25 | }
|
---|
26 |
|
---|
27 | $({ global: true, forced: IS_PURE }, {
|
---|
28 | AsyncIterator: AsyncIteratorConstructor
|
---|
29 | });
|
---|
Note:
See
TracBrowser
for help on using the repository browser.