Last active
August 29, 2015 14:01
-
-
Save 19h/3f0943493e38857d9cfc to your computer and use it in GitHub Desktop.
Javascript Harmony (ES6) detection and >=0.11 Node.js requirement.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
try { | |
(new Map).set(); | |
require("assert").ok((process.version.split(".")[1]|0) > 10); | |
} catch (e) { | |
console.log("\nSupport for ES5 environments was dropped.\nES6 is required; Please upgrade to >= 0.11 and run node with --harmony.\n\nYou are currently using " + process.version + ".\n\n"), process.reallyExit() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment