Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/timneutkens/is-async-supported

Check if async/await is available natively
https://github.com/timneutkens/is-async-supported

async-await

Last synced: 13 days ago
JSON representation

Check if async/await is available natively

Awesome Lists containing this project

README

        

# is-async-supported

Check if async/await is available

## Installation

`npm install is-async-supported`

## Usage

```javascript
const isAsyncSupported = require('is-async-supported')

if(!isAsyncSupported()) {
// Load runtime transform
}
```

## Background

This package gives you the ability to load for example [async-to-gen](https://github.com/leebyron/async-to-gen) only when your Node.js environment doesn't support async/await.

At the moment this is not suitable for checking in browsers since it depends on the `VM` module provided by Node.js