ECMAScript 6 features available in Node.js 0.12

Features without --harmony flag:

  • “for-of” loop
  • Map, Set, WeakMap, WeakSet (already specified in question)
  • Symbol (already specified in question)
  • Promise (already specified in question)
  • Array methods:
    • .keys()
    • .values()
    • .entries()
    • [Symbol.iterator]
  • Object:
    • .observe() (initially was planned for ES7, but was removed from the spec entirely on November 2, 2015)
    • .is()
    • .setPrototypeOf()
    • .getOwnPropertySymbols()
    • .getNotifier() (not es6, example here)
    • .apply() and .call() (not es6, same purpose as Funciton.prototype.call and Function.prototype.apply)
  • Number properties and methods (already specified in question)
    • .isInteger()
    • .isSafeInteger()
    • .isNaN()
    • .isFinite()
    • EPSILON
    • MIN_SAFE_INTEGER
    • MAX_SAFE_INTEGER
  • Math methods (a lot of them) (already specified in question)
  • constants

I thinks that’s all that we have without --harmony flag.

Features with --harmony flag:

  • generators
  • arrow functions (without need of --harmony_arrow_functions flag in contrast to io.js)
  • let variables – only in strict mode
  • Binary and octal literals
  • String methods:

    • .contains() (was replaced by includes() in actual ES6 specification)
    • .startsWith()
    • .endsWith()
    • .codePointAt()
    • .repeat()
    • .normalize()
    • String.fromCodePoint
  • Proxy (behind the --harmony-proxies flag)

I think that’s all. Maybe if I forgot something – I’ll add it later to the list.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)