Skip to content

Latest commit

 

History

History

detect-async-await-support

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Async/Await Support

Detect native async/await support.

Usage

var hasAsyncAwaitSupport = require( '@stdlib/utils/detect-async-await-support' );

hasAsyncAwaitSupport()

Detects if a runtime environment supports ES2017 async/await.

var bool = hasAsyncAwaitSupport();
// returns <boolean>

Examples

var hasAsyncAwaitSupport = require( '@stdlib/utils/detect-async-await-support' );

var bool = hasAsyncAwaitSupport();
if ( bool ) {
    console.log( 'Environment has native async/await support.' );
} else {
    console.log( 'Environment lacks native async/await support.' );
}

CLI

Usage

Usage: hasasyncawait [options]

Options:

  -h,    --help                Print this message.
  -V,    --version             Print the package version.

Examples

$ hasasyncawait
<boolean>