Harmony added native
node is nice enough to hide them in ES5 mode:
if ('function' === typeof Map) /* yup, ES6 */
If you're writing project that uses new ES6 syntax you might want to add it somewhere at the top of your main file (before you load
if ('function' !== typeof Map) throw new Error("ES6 is required; add --harmony");
It's not a bullet-proof feature detection for all ES6 features, but a good enough and future-proof way to warn users when they launched node without required ES6 support.