Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: 3 days ago
JSON representation
Check if async/await is available natively
- Host: GitHub
- URL: https://github.com/timneutkens/is-async-supported
- Owner: timneutkens
- Created: 2016-12-18T00:22:11.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2023-01-12T05:06:08.000Z (almost 2 years ago)
- Last Synced: 2024-12-15T06:00:47.053Z (11 days ago)
- Topics: async-await
- Language: JavaScript
- Size: 262 KB
- Stars: 16
- Watchers: 3
- Forks: 5
- Open Issues: 16
-
Metadata Files:
- Readme: README.md
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