Skip to content

Instantly share code, notes, and snippets.

@lili21
Forked from bendc/supportsES6.js
Created December 13, 2017 06:19
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 lili21/43a1faee66b1ba49db734cef147b0b52 to your computer and use it in GitHub Desktop.
Save lili21/43a1faee66b1ba49db734cef147b0b52 to your computer and use it in GitHub Desktop.
Test if ES6 is ~fully supported
var supportsES6 = function() {
try {
new Function("(a = 0) => a");
return true;
}
catch (err) {
return false;
}
}();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment