File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed
Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change 1+ import Symbol from '@core-js/pure/es/symbol' ;
2+ import globalThis from '@core-js/pure/es/global-this' ;
13import assign from '@core-js/pure/es/object/assign' ;
24import isIterable from '@core-js/pure/es/is-iterable' ;
3- import ASYNC_ITERATOR from '@core-js/pure/es/symbol/async-iterator' ;
45import { is , arrayFromArrayLike } from './helpers.js' ;
56
7+ function toPropertyKey ( it ) {
8+ return typeof it === 'symbol' ? it : String ( it ) ;
9+ }
10+
11+ // for Babel / Regenerator runtime
12+ if ( ! globalThis . Symbol || toPropertyKey ( globalThis . Symbol . iterator ) !== toPropertyKey ( Symbol . iterator ) ) {
13+ globalThis . Symbol = Symbol ;
14+ }
15+
616const { getOwnPropertyDescriptor, getOwnPropertyNames } = Object ;
717const { toString, propertyIsEnumerable } = Object . prototype ;
818
@@ -46,7 +56,7 @@ assign(assert, {
4656 } ,
4757 isAsyncIterable ( actual , message = 'The value is async iterable' ) {
4858 this . pushResult ( {
49- result : typeof actual == 'object' && typeof actual [ ASYNC_ITERATOR ] == 'function' ,
59+ result : typeof actual == 'object' && typeof actual [ Symbol . asyncIterator ] == 'function' ,
5060 actual,
5161 expected : 'The value should be async iterable' ,
5262 message,
You can’t perform that action at this time.
0 commit comments