File tree Expand file tree Collapse file tree
symbol/async-iterator/lib
utils/constructor-name/examples Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2020
2121// MODULES //
2222
23- var AsyncIteratorSymbol = ( hasAsyncIteratorSymbolSupport ( ) ) ? Symbol [ 'asyncIterator' ] : null ; // eslint-disable-line max-len
23+ var hasAsyncIteratorSymbolSupport = require ( '@stdlib/assert/has-async-iterator-symbol-support' ) ;
2424
2525
2626// MAIN //
@@ -39,7 +39,9 @@ var AsyncIteratorSymbol = ( hasAsyncIteratorSymbolSupport() ) ? Symbol[ 'asyncIt
3939* console.log( 'Environment does support Symbol.asyncIterator.' );
4040* }
4141*/
42- var AsyncIteratorSymbol = ( hasAsyncIteratorSymbolSupport ( ) ) ? Symbol [ 'asyncIterator' ] : null ; // eslint-disable-line max-len
42+ var AsyncIteratorSymbol = ( hasAsyncIteratorSymbolSupport ( ) ) ?
43+ Object . getOwnPropertyDescriptor ( Symbol , 'asyncIterator' ) . value :
44+ null ;
4345
4446
4547// EXPORTS //
Original file line number Diff line number Diff line change @@ -148,7 +148,7 @@ console.log( constructorName( new Float64Array() ) );
148148console . log ( constructorName ( new ArrayBuffer ( ) ) ) ;
149149// => 'ArrayBuffer'
150150
151- console . log ( constructorName ( new Buffer ( 'beep' ) ) ) ;
151+ console . log ( constructorName ( new Buffer ( 'beep' ) ) ) ;
152152// => 'Buffer'
153153
154154console . log ( constructorName ( Math ) ) ;
You can’t perform that action at this time.
0 commit comments