Include es5-shim especially if your browser doesn't support ECMAScript 5 - but every JS engine requires the es5-shim to correct broken implementations, so it's strongly recommended to always include it. Additionally, es5-shim should be loaded before es6-shim.
For node.js, io.js, or any npm-managed workflow (this is the recommended method):
npm install es6-shim
Alternative methods:
component install paulmillr/es6-shim if you’re using component(1).
These methods are part of "Annex B", which means that although they are a defacto standard, you shouldn't use them. None the less, the es6-shim provides them and normalizes their behavior across browsers.
Subclassing
The Map, Set, and Promise implementations are subclassable.
You should use the following pattern to create a subclass in ES5 which will continue to work in ES6:
Including a proper shim for String.prototype.normalize would increase the size of this library by a factor of more than 4.
So instead we recommend that you install the unorm package alongside es6-shim if you need String.prototype.normalize.
See https://github.com/paulmillr/es6-shim/issues/134 for more discussion.
WeakMap shim
It is not possible to implement WeakMap in pure javascript.
The es6-collections implementation doesn't hold values strongly, which is critical for the collection. es6-shim decided to not include an incorrect shim.
WeakMap has very unusual use-cases, so you probably won't need it at all (use simple Map instead).
Note that null objects (Object.create(null), eg, an object with null as its [[Prototype]]) can not have their [[Prototype]] changed except via a native Object.setPrototypeOf.
Well-known Symbols
In order to make them work cross-realm, these are created with the global Symbol registry via Symbol.for. This does not violate the spec, but it does mean that Symbol.for('Symbol.search') === Symbol.search will be true, which it would not by default in a fresh compliant realm.