Check if async/await is available
npm install is-async-supported
const isAsyncSupported = require('is-async-supported')
if(!isAsyncSupported()) {
// Load runtime transform
}
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