is-async-supported

Check if async/await is available

MIT 3 个版本
安装
npm install is-async-supported
yarn add is-async-supported
pnpm add is-async-supported
bun add is-async-supported
README

is-async-supported

Check if async/await is available

Installation

npm install is-async-supported

Usage

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 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

版本列表
1.2.0 2016-12-18
1.0.1 2016-12-18
1.0.0 2016-12-18