Skip to content

Instantly share code, notes, and snippets.

@wtfaremyinitials
Created January 22, 2018 21:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wtfaremyinitials/bab760d6b42e95cf0d12114c13e158e8 to your computer and use it in GitHub Desktop.
Save wtfaremyinitials/bab760d6b42e95cf0d12114c13e158e8 to your computer and use it in GitHub Desktop.
let asyncawait = true;
try {
new Function('async function test(){await 1}');
} catch (error) {
asyncawait = false;
}
if (asyncawait)
module.exports = require('./lib/Puppeteer');
else
module.exports = require('./node6/lib/Puppeteer');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment