summaryrefslogtreecommitdiffstats
path: root/js/vendor
diff options
context:
space:
mode:
authorBernhard Posselt <dev@bernhard-posselt.com>2014-09-11 03:55:52 +0200
committerBernhard Posselt <dev@bernhard-posselt.com>2014-09-11 03:55:52 +0200
commitea9ebd4826fe9807af5bc17e786b3dc58f163970 (patch)
tree2894b40614ebe977797cea5745b215e2a2851f61 /js/vendor
parent594b92f649d8ed8a705f1af23639463078170d46 (diff)
port to es5 and add es6 shims for object prototypes instead
Diffstat (limited to 'js/vendor')
-rw-r--r--js/vendor/es6-shim/.bower.json41
-rw-r--r--js/vendor/es6-shim/CHANGELOG.md163
-rw-r--r--js/vendor/es6-shim/Gruntfile.js98
-rw-r--r--js/vendor/es6-shim/README.md221
-rw-r--r--js/vendor/es6-shim/bower.json29
-rw-r--r--js/vendor/es6-shim/component.json23
-rw-r--r--js/vendor/es6-shim/es6-sham.js106
-rw-r--r--js/vendor/es6-shim/es6-sham.map1
-rw-r--r--js/vendor/es6-shim/es6-sham.min.js2
-rw-r--r--js/vendor/es6-shim/es6-shim.js1928
-rw-r--r--js/vendor/es6-shim/es6-shim.map1
-rw-r--r--js/vendor/es6-shim/es6-shim.min.js2
-rw-r--r--js/vendor/es6-shim/package.json69
-rw-r--r--js/vendor/es6-shim/test-sham/index.html22
-rw-r--r--js/vendor/es6-shim/test-sham/set-prototype-of.js24
-rw-r--r--js/vendor/es6-shim/testling.html35
-rw-r--r--js/vendor/momentjs/.bower.json10
-rw-r--r--js/vendor/momentjs/CHANGELOG.md16
-rw-r--r--js/vendor/momentjs/bower.json2
-rw-r--r--js/vendor/momentjs/locale/ar.js78
-rw-r--r--js/vendor/momentjs/locale/cs.js2
-rw-r--r--js/vendor/momentjs/min/locales.js80
-rw-r--r--js/vendor/momentjs/min/locales.min.js2
-rw-r--r--js/vendor/momentjs/min/moment-with-locales.js177
-rw-r--r--js/vendor/momentjs/min/moment-with-locales.min.js12
-rw-r--r--js/vendor/momentjs/min/moment.min.js5
-rw-r--r--js/vendor/momentjs/moment.js97
-rw-r--r--js/vendor/traceur-runtime/.bower.json21
-rw-r--r--js/vendor/traceur-runtime/README.md35
-rw-r--r--js/vendor/traceur-runtime/bower.json11
-rw-r--r--js/vendor/traceur-runtime/traceur-runtime.js2412
-rw-r--r--js/vendor/traceur-runtime/traceur-runtime.min.js2412
-rw-r--r--js/vendor/traceur-runtime/traceur-runtime.min.map1
33 files changed, 3103 insertions, 5035 deletions
diff --git a/js/vendor/es6-shim/.bower.json b/js/vendor/es6-shim/.bower.json
new file mode 100644
index 000000000..da6e71fa5
--- /dev/null
+++ b/js/vendor/es6-shim/.bower.json
@@ -0,0 +1,41 @@
+{
+ "name": "es6-shim",
+ "repo": "paulmillr/es6-shim",
+ "version": "0.18.0",
+ "description": "ECMAScript 6 (Harmony) compatibility shims for legacy JavaScript engines",
+ "keywords": [
+ "ecmascript",
+ "harmony",
+ "es6",
+ "shim",
+ "promise",
+ "promises",
+ "setPrototypeOf",
+ "map",
+ "set",
+ "__proto__"
+ ],
+ "main": "es6-shim.js",
+ "scripts": [
+ "es6-shim.js"
+ ],
+ "dependencies": {},
+ "development": {},
+ "ignore": [
+ "**/.*",
+ "node_modules",
+ "components",
+ "test"
+ ],
+ "homepage": "https://github.com/paulmillr/es6-shim",
+ "_release": "0.18.0",
+ "_resolution": {
+ "type": "version",
+ "tag": "0.18.0",
+ "commit": "0b6d1dda46c13dfc9d1240a4f5e1b31ed78c8c0b"
+ },
+ "_source": "git://github.com/paulmillr/es6-shim.git",
+ "_target": "~0.18.0",
+ "_originalSource": "es6-shim",
+ "_direct": true
+} \ No newline at end of file
diff --git a/js/vendor/es6-shim/CHANGELOG.md b/js/vendor/es6-shim/CHANGELOG.md
new file mode 100644
index 000000000..4c3ae2b28
--- /dev/null
+++ b/js/vendor/es6-shim/CHANGELOG.md
@@ -0,0 +1,163 @@
+# es6-shim x.x.x (not yet released)
+
+# es6-shim 0.18.0 (6 Sep 2014)
+* Speed up String#trim replacement (#284)
+* named Array#find and Array#findIndex for easier debugging
+* Replace broken native implementation in Firefox 25-31 for Array#find and Array#findIndex
+* Ensure String.fromCodePoint has the correct length in Firefox
+* List the license in `package.json` for `npm`
+* Array.from: fix spec bug with Array.from([], undefined) throwing
+* Array.from: fix Firefox Array.from bug wrt swallowing negative lengths vs throwing
+
+# es6-shim 0.17.0 (31 Aug 2014)
+* Added es6-sham (#281)
+* Fixing some flaky tests (#268)
+* Tweaking how ArrayIterator is checked in its "next" function
+* Cleaning up some of the logic in Array.from
+
+# es6-shim 0.16.0 (6 Aug 2014)
+* Array#find and Array#findIndex: no longer skips holes in sparse arrays, per https://bugs.ecmascript.org/show_bug.cgi?id=3107
+
+# es6-shim 0.15.1 (5 Aug 2014)
+* Array.from: now correctly throws if provided `undefined` as a mapper function
+* Array.from: now correctly works if provided a falsy `thisArg`
+* Fix tests so they work properly when Array#(values|keys|entries) are not present
+* Add `npm run lint` to run style checks independently
+* Add `test/native.html` so browsers can be easily checked for shim-less compliance.
+
+# es6-shim 0.15.0 (31 Jul 2014)
+* Object.assign no longer throws on null or undefined sources, per https://bugs.ecmascript.org/show_bug.cgi?id=3096
+
+# es6-shim 0.14.0 (20 Jul 2014)
+* Properly recognize Symbol.iterator when it is present (#277)
+* Fix Math.clz's improper handling of values that coerce to NaN (#269)
+* Fix incorrect handling of negative end index on Array#fill (#270)
+* Removed Object.getOwnPropertyKeys, which shouldn't be anywhere (#267)
+* Fixed arity of Map and Set constructors, per 2014.04.27 draft spec (rev 24)
+* Added a full additional suite of ES6 promise tests (thanks to @smikes!) (#265)
+* Make Number.isInteger a bit more efficient (#266)
+* Added `npm run test-native` to expose how broken implementations are without the shim ;-)
+* Added additional tests
+
+# es6-shim 0.13.0 (11 Jun 2014)
+* Adapt to new Array.from changes: mapper function is now called with both value and index (#261, #262)
+* More reliably getting the global object in strict mode to fix node-webkit (#258, #259)
+* Properly test the global Promise for ignoring non-function callbacks (#258)
+
+# es6-shim 0.12.0 (4 Jun 2014)
+* Fix String#trim implementations that incorrectly trim \u0085
+* Stop relying on ArrayIterator being a public var, fixing Safari 8
+
+# es6-shim 0.11.1 (2 Jun 2014)
+* Make sure to shim Object.assign in all environments, not just true ES5
+* Now including minified file and source map
+
+# es6-shim 0.11.0 (11 May 2014)
+* Remove `Object.getOwnPropertyDescriptors`, per spec. (#234, #235)
+* IE8 fixes. (#163, #236)
+* Improve `Promise` scheduling. (#231)
+* Add some more standalone shims
+* Use an Object.create fallback, for better ES3 compatibility
+* Fix Math.expm1 in more browsers (#84)
+* Fix es6-shim in Web Workers (#247, #248)
+* Correct Object.assign to take multiple sources (#241)
+
+# es6-shim 0.10.1 (13 Mar 2014)
+* Update bower.json, component.json, and .npmignore (#229, #230, #233)
+* Minor updates to `Promise` implementation and test suite.
+* Workaround lack of 'strict mode' in IE9. (#232)
+
+# es6-shim 0.10.0 (1 March 2014)
+* Implement `Promise`, per spec. (#209, #215, #224, #225)
+* Make `Map`/`Set` subclassable; support `iterable` argument to
+ constructor (#218)
+* Rename `Number#clz` to `Math.clz32` (#217)
+* Bug fixes to `Array#find` and `Array#findIndex` on sparse arrays (#213)
+* Re-add `Number.isInteger` (mistakenly removed in 0.9.0)
+* Allow use of `arguments` as an iterable
+* Minor spec-compliance fixes for `String.raw`
+* In ES6, `Object.keys` accepts non-Object types (#220)
+* Improved browser compatibility with IE 9/10, Opera 12 (#225)
+
+# es6-shim 0.9.3 (5 February 2014)
+* Per spec, removed `Object.mixin` (#192)
+* Per spec, treat -0 and +0 keys as identical in Map/Set (#129, #204)
+* Per spec, `ArrayIterator`/`Array#values()` skips sparse indexes now. (#189)
+* Added `Array.from`, supporting Map/Set/Array/String iterators (the String iterator iterates over codepoints, not indexes) (#182)
+* Bug fixes to Map/Set iteration after concurrent delete. (#183)
+* Bug fixes to `Number.clz`: 0 and 0x100000000 are handled correctly now. (#196)
+* Added `Math.fround` to truncate to a 32-bit floating point number. (#140)
+* Bug fix for `Math.cosh` (#178)
+* Work around Firefox bugs in `String#startsWith` and `String#endsWith` (#172)
+* Work around Safari bug in `Math.imul`
+
+# es6-shim 0.9.2 (18 December 2013)
+* Negative `String#endsWith` position is now handled properly.
+* `TypeError` is now thrown when string methods are called
+ on `null` / `undefined`.
+
+# es6-shim 0.9.1 (28 October 2013)
+* Added `Array#copyWithin` and `Number.MIN_SAFE_INTEGER`
+* Big speed-up of Maps / Sets for string / number keys:
+ they are O(1) now.
+* Changed `Math.hypot` according to spec.
+* Other small fixes.
+
+# es6-shim 0.9.0 (30 August 2013)
+* Added Array iteration methods: `Array#keys`, `Array#values`, `Array#entries`, which return an `ArrayIterator`
+* Changed `Map` and `Set` constructors to conform to spec when called without `new`
+* Added `Math.imul`
+* Per spec, removed `Number.toInteger`, `Number.isInteger`, and `Number.MAX_INTEGER`; added `Number.isSafeInteger`, `Number.MAX_SAFE_INTEGER`
+* Added extensive additional tests for many methods
+
+# es6-shim 0.8.0 (8 June 2013)
+* Added `Object.setPrototypeOf`, `Set#keys`, `Set#values`, `Map#keys`, `Map#values`, `Map#entries`, `Set#entries`.
+* Fixed `String#repeat` according to spec.
+
+# es6-shim 0.7.0 (2 April 2013)
+* Added `Array#find`, `Array#findIndex`, `Object.assign`, `Object.mixin`,
+ `Math.cbrt`, `String.fromCodePoint`, `String#codePointAt`.
+* Removed `Object.isnt`.
+* Made Math functions fully conform spec.
+
+# es6-shim 0.6.0 (15 January 2013)
+* Added `Map#keys`, `Map#values`, `Map#size`, `Set#size`, `Set#clear`.
+
+# es6-shim 0.5.3 (2 September 2012)
+* Made `String#startsWith`, `String#endsWith` fully conform spec.
+
+# es6-shim 0.5.2 (17 June 2012)
+* Removed `String#toArray` and `Object.isObject` as per spec updates.
+
+# es6-shim 0.5.1 (14 June 2012)
+* Made Map and Set follow Spidermonkey implementation instead of V8.
+`var m = Map(); m.set('key', void 0); m.has('key');` now gives true.
+
+# es6-shim 0.5.0 (13 June 2012)
+* Added Number.MAX_INTEGER, Number.EPSILON, Number.parseInt,
+Number.parseFloat, Number.prototype.clz, Object.isObject.
+
+# es6-shim 0.4.1 (11 May 2012)
+* Fixed boundary checking in Number.isInteger.
+
+# es6-shim 0.4.0 (8 February 2012)
+* Added Math.log10, Math.log2, Math.log1p, Math.expm1, Math.cosh,
+Math.sinh, Math.tanh, Math.acosh, Math.asinh, Math.atanh, Math.hypot,
+Math.trunc.
+
+# es6-shim 0.3.1 (30 January 2012)
+* Added IE8 support.
+
+# es6-shim 0.3.0 (27 January 2012)
+* Added Number.isFinite() and Object.isnt().
+
+# es6-shim 0.2.1 (7 January 2012)
+* Fixed a bug in String#endsWith().
+
+# es6-shim 0.2.0 (25 December 2011)
+* Added browser support.
+* Added tests.
+* Added Math.sign().
+
+# es6-shim 0.1.0 (25 December 2011)
+* Initial release
diff --git a/js/vendor/es6-shim/Gruntfile.js b/js/vendor/es6-shim/Gruntfile.js
new file mode 100644
index 000000000..73e25feb0
--- /dev/null
+++ b/js/vendor/es6-shim/Gruntfile.js
@@ -0,0 +1,98 @@
+module.exports = function(grunt) {
+ var browsers = [
+ { browserName: "firefox", version: "19", platform: "XP" },
+ { browserName: "firefox", platform: "linux" },
+ { browserName: "chrome", platform: "linux" },
+ { browserName: "internet explorer", platform: "Windows 8.1", version: "11" },
+ { browserName: "internet explorer", platform: "WIN8", version: "10" },
+ { browserName: "internet explorer", platform: "VISTA", version: "9" },
+ { browserName: 'safari', platform: 'OS X 10.6' },
+ { browserName: 'safari', platform: 'OS X 10.8' },
+ { browserName: 'safari', platform: 'OS X 10.9' },
+ { browserName: 'iphone', platform: 'OS X 10.9', version: '7.1' },
+ { browserName: 'android', platform: 'Linux', version: '4.4' },
+ ];
+ var extraBrowsers = [
+ { browserName: "firefox", platform: "linux", version: "30" },
+ { browserName: "firefox", platform: "linux", version: "25" },
+ { browserName: "firefox", platform: "OS X 10.9" },
+ { browserName: "chrome", platform: "XP" },
+ { browserName: "chrome", platform: "OS X 10.9" },
+ { browserName: 'iphone', platform: 'OS X 10.8', version: '6.1' },
+ { browserName: 'iphone', platform: 'OS X 10.8', version: '5.1' },
+ { browserName: 'android', platform: 'Linux', version: '4.2' },
+ // XXX haven't investigated these:
+ //{ browserName: "opera", platform: "Windows 2008", version: "12" }
+ //{ browserName: 'iphone', platform: 'OS X 10.6', version: '4.3' },
+ //{ browserName: 'android', platform: 'Linux', version: '4.0' },
+ ];
+ if (grunt.option('extra')) {
+ browsers = browsers.concat(extraBrowsers);
+ }
+ grunt.initConfig({
+ connect: {
+ server: {
+ options: {
+ base: "",
+ port: 9999,
+ useAvailablePort: true
+ }
+ }
+ },
+ 'saucelabs-mocha': {
+ all: {
+ options: {
+ urls: (function() {
+ var urls = ["http://localhost:9999/test/"];
+ if (grunt.option('extra')) {
+ urls.push("http://localhost:9999/test-sham/");
+ }
+ return urls;
+ })(),
+ //tunnelTimeout: 5,
+ build: process.env.TRAVIS_BUILD_NUMBER,
+ tunneled: !process.env.SAUCE_HAS_TUNNEL,
+ identifier: process.env.TRAVIS_JOB_NUMBER,
+ sauceConfig: {
+ 'tunnel-identifier': process.env.TRAVIS_JOB_NUMBER
+ },
+ //concurrency: 3,
+ browsers: browsers,
+ testname: (function() {
+ var testname = "mocha";
+ if (process.env.TRAVIS_PULL_REQUEST &&
+ process.env.TRAVIS_PULL_REQUEST !== 'false') {
+ testname += ' (PR '+process.env.TRAVIS_PULL_REQUEST+')';
+ }
+ if (process.env.TRAVIS_BRANCH &&
+ process.env.TRAVIS_BRANCH !== 'false') {
+ testname += ' (branch '+process.env.TRAVIS_BRANCH+')';
+ }
+ return testname;
+ })(),
+ tags: (function() {
+ var tags = [];
+ if (process.env.TRAVIS_PULL_REQUEST &&
+ process.env.TRAVIS_PULL_REQUEST !== 'false') {
+ tags.push('PR-'+process.env.TRAVIS_PULL_REQUEST);
+ }
+ if (process.env.TRAVIS_BRANCH &&
+ process.env.TRAVIS_BRANCH !== 'false') {
+ tags.push(process.env.TRAVIS_BRANCH);
+ }
+ return tags;
+ })()
+ }
+ }
+ },
+ watch: {}
+ });
+ // Loading dependencies
+ for (var key in grunt.file.readJSON("package.json").devDependencies) {
+ if (key !== "grunt" && key.indexOf("grunt") === 0) {
+ grunt.loadNpmTasks(key);
+ }
+ }
+ grunt.registerTask("dev", ["connect", "watch"]);
+ grunt.registerTask("sauce", ["connect", "saucelabs-mocha"]);
+};
diff --git a/js/vendor/es6-shim/README.md b/js/vendor/es6-shim/README.md
new file mode 100644
index 000000000..7d08f3525
--- /dev/null
+++ b/js/vendor/es6-shim/README.md
@@ -0,0 +1,221 @@
+# ES6 Shim
+Provides compatibility shims so that legacy JavaScript engines behave as
+closely as possible to ECMAScript 6 (Harmony).
+
+[![Build Status][1]][2] [![dependency status][3]][4] [![dev dependency status][5]][6]
+
+[![browser support](https://ci.testling.com/paulmillr/es6-shim.png)](https://ci.testling.com/paulmillr/es6-shim)
+
+[![Sauce Test Status](https://saucelabs.com/browser-matrix/es6-shim.svg)](https://saucelabs.com/u/es6-shim)
+
+## Installation
+If you want to use it in browser:
+
+* Just include es6-shim before your scripts.
+* Include [es5-shim](https://github.com/kriskowal/es5-shim) if your browser doesn't support ECMAScript 5.
+* `component install paulmillr/es6-shim` if you’re using [component(1)](https://github.com/component/component).
+* `bower install es6-shim` if you’re using [Twitter Bower](http://bower.io/).
+
+For node.js:
+
+ npm install es6-shim
+
+In both browser and node you may also want to include `unorm`; see the
+[`String.prototype.normalize`](#stringprototypenormalize) section for
+details.
+
+## Safe shims
+
+* `Map`, `Set` (requires ES5)
+* `Promise`
+* `String`:
+ * `fromCodePoint()` ([a standalone shim is also available](http://mths.be/fromcodepoint))
+ * `raw()`
+* `String.prototype`:
+ * `codePointAt()` ([a standalone shim is also available](http://mths.be/codepointat))
+ * `repeat()` ([a standalone shim is also available](http://mths.be/repeat))
+ * `startsWith()` ([a standalone shim is also available](http://mths.be/startswith))
+ * `endsWith()` ([a standalone shim is also available](http://mths.be/endswith))
+ * `contains()` ([a standalone shim is also available](http://mths.be/contains))
+* `Number`:
+ * `MAX_SAFE_INTEGER`
+ * `MIN_SAFE_INTEGER`
+ * `EPSILON`
+ * `parseInt()`
+ * `parseFloat()`
+ * `isNaN()`([a standalone shim is also available](https://npmjs.org/package/is-nan))
+ * `isInteger()`
+ * `isSafeInteger()`
+ * `isFinite()`
+* `Array`:
+ * `from()` ([a standalone shim is also available](https://npmjs.org/package/array.from))
+ * `of()` ([a standalone shim is also available](https://npmjs.org/package/array.of))
+* `Array.prototype`:
+ * `copyWithin()`
+ * `fill()`
+ * `find()` ([a standalone shim is also available](https://github.com/paulmillr/Array.prototype.find))
+ * `findIndex()` ([a standalone shim is also available](https://github.com/paulmillr/Array.prototype.findIndex))
+ * `keys()` (note: keys/values/entries return an `ArrayIterator` object)
+ * `entries()`
+ * `values()`
+* `Object`:
+ * `getPropertyDescriptor()` (ES5)
+ * `getPropertyNames()` (ES5)
+ * `getPropertyKeys()` (ES5)
+ * `keys()` (ES5, but no longer throws on non-object non-null/undefined values in ES6)
+ * `is()` ([a standalone shim is also available](https://github.com/ljharb/object-is))
+ * `assign()` ([a standalone shim is also available](https://github.com/ljharb/object.assign))
+ * `setPrototypeOf()` (IE >= 11)
+* `Math`:
+ * `acosh()`
+ * `asinh()`
+ * `atanh()`
+ * `cbrt()`
+ * `clz32()`
+ * `cosh()`
+ * `expm1()`
+ * `hypot()`
+ * `log2()`
+ * `log10()`
+ * `log1p()`
+ * `sign()`
+ * `sinh()`
+ * `tanh()`
+ * `trunc()`
+ * `imul()`
+ * `fround()`
+
+Math functions accuracy is 1e-11.
+
+## 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:
+```javascript
+function MyPromise(exec) {
+ Promise.call(this, exec);
+ // ...
+}
+Object.setPrototypeOf(MyPromise, Promise);
+MyPromise.prototype = Object.create(Promise.prototype, {
+ constructor: { value: MyPromise }
+});
+```
+
+## String.prototype.normalize
+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`](https://github.com/walling/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](https://github.com/WebReflection/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 a very unusual use-case so you probably won't need it at all
+(use simple `Map` instead).
+
+## Getting started
+
+```javascript
+'abc'.startsWith('a') // true
+'abc'.endsWith('a') // false
+'john alice'.contains('john') // true
+'123'.repeat(2) // '123123'
+
+Object.is(NaN, NaN) // Fixes ===. 0 isnt -0, NaN is NaN
+Object.assign({a: 1}, {b: 2}) // {a: 1, b: 2}
+
+Number.isNaN('123') // false. isNaN('123') will give true.
+Number.isFinite('asd') // false. Global isFinite() will give true.
+// Tests if value is a number, finite,
+// >= -9007199254740992 && <= 9007199254740992 and floor(value) === value
+Number.isInteger(2.4) // false.
+
+Math.sign(400) // 1, 0 or -1 depending on sign. In this case 1.
+
+[5, 10, 15, 10].find(function(item) {return item / 2 === 5;}) // 10
+[5, 10, 15, 10].findIndex(function(item) {return item / 2 === 5;}) // 1
+
+// Replacement for `{}` key-value storage.
+// Keys can be anything.
+var map = new Map()
+map.set('John', 25)
+map.set('Alice', 400)
+map.set(['meh'], 555)
+map.get(['meh']) // undefined because you need to use exactly the same object.
+map.delete('Alice')
+map.keys()
+map.values()
+map.size // 2
+
+// Useful for storing unique items.
+var set = new Set()
+set.add(1)
+set.add(5)
+set.has(1)
+set.has(4) // => false
+set.delete(5)
+
+// Promises, see
+// http://www.slideshare.net/domenicdenicola/callbacks-promises-and-coroutines-oh-my-the-evolution-of-asynchronicity-in-javascript
+// https://github.com/petkaantonov/bluebird/#what-are-promises-and-why-should-i-use-them
+Promise.resolve(5).then(function(value) {
+ if ( ... ) throw new Error("whoops!");
+ // do some stuff
+ return anotherPromise();
+}).catch(function(e) {
+ // any errors thrown asynchronously end up here
+});
+```
+
+Note that the ES6 `Promise` specification includes very few methods.
+For a more useful set of utility methods
+(`map`/`reduce`/`bind`/`guard`/etc), you might want to look into the
+[`prfun`](https://github.com/cscott/prfun) package.
+
+Other stuff:
+
+* [ECMAScript 6 drafts](http://wiki.ecmascript.org/doku.php?id=harmony:specification_drafts)
+* [Harmony proposals](http://wiki.ecmascript.org/doku.php?id=harmony:harmony)
+
+## License
+The project was initially based on [es6-shim by Axel Rauschmayer](https://github.com/rauschma/es6-shim).
+
+Current maintainers are: [Paul Miller](http://paulmillr.com), [Jordan Harband](https://github.com/ljharb), and [C. Scott Ananian](http://cscott.net).
+
+The MIT License (MIT)
+
+Copyright (c) 2013-2014 Paul Miller (http://paulmillr.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+of the Software, and to permit persons to whom the Software is furnished to do
+so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
+[1]: https://travis-ci.org/paulmillr/es6-shim.svg
+[2]: https://travis-ci.org/paulmillr/es6-shim
+[3]: https://david-dm.org/paulmillr/es6-shim.svg
+[4]: https://david-dm.org/paulmillr/es6-shim
+[5]: https://david-dm.org/paulmillr/es6-shim/dev-status.svg
+[6]: https://david-dm.org/paulmillr/es6-shim#info=devDependencies
+
diff --git a/js/vendor/es6-shim/bower.json b/js/vendor/es6-shim/bower.json
new file mode 100644
index 000000000..a6a3d156e
--- /dev/null
+++ b/js/vendor/es6-shim/bower.json
@@ -0,0 +1,29 @@
+{
+ "name": "es6-shim",
+ "repo": "paulmillr/es6-shim",
+ "version": "0.18.0",
+ "description": "ECMAScript 6 (Harmony) compatibility shims for legacy JavaScript engines",
+ "keywords": [
+ "ecmascript",
+ "harmony",
+ "es6",
+ "shim",
+ "promise",
+ "promises",
+ "setPrototypeOf",
+ "map",
+ "set",
+ "__proto__"
+ ],
+ "main": "es6-shim.js",
+ "scripts": ["es6-shim.js"],
+ "dependencies": {},
+ "development": {},
+ "ignore": [
+ "**/.*",
+ "node_modules",
+ "components",
+ "test"
+ ]
+}
+
diff --git a/js/vendor/es6-shim/component.json b/js/vendor/es6-shim/component.json
new file mode 100644
index 000000000..dce105fd8
--- /dev/null
+++ b/js/vendor/es6-shim/component.json
@@ -0,0 +1,23 @@
+{
+ "name": "es6-shim",
+ "repo": "paulmillr/es6-shim",
+ "version": "0.18.0",
+ "description": "ECMAScript 6 (Harmony) compatibility shims for legacy JavaScript engines",
+ "keywords": [
+ "ecmascript",
+ "harmony",
+ "es6",
+ "shim",
+ "promise",
+ "promises",
+ "setPrototypeOf",
+ "map",
+ "set",
+ "__proto__"
+ ],
+ "main": "es6-shim.js",
+ "scripts": ["es6-shim.js"],
+ "dependencies": {},
+ "development": {}
+}
+
diff --git a/js/vendor/es6-shim/es6-sham.js b/js/vendor/es6-shim/es6-sham.js
new file mode 100644
index 000000000..32fadd25c
--- /dev/null
+++ b/js/vendor/es6-shim/es6-sham.js
@@ -0,0 +1,106 @@
+// ES6-shim 0.18.0 (c) 2013-2014 Paul Miller (http://paulmillr.com)
+// ES6-shim may be freely distributed under the MIT license.
+// For more details and documentation:
+// https://github.com/paulmillr/es6-shim/
+
+(function (undefined) {
+ 'use strict';
+
+ /*jshint evil: true */
+ var getGlobal = new Function('return this;');
+ /*jshint evil: false */
+
+ var main = function () {
+ var globals = getGlobal();
+ var Object = globals.Object;
+
+ // NOTE: This versions needs object ownership
+ // beacuse every promoted object needs to be reassigned
+ // otherwise uncompatible browsers cannot work as expected
+ //
+ // NOTE: This might need es5-shim or polyfills upfront
+ // because it's based on ES5 API.
+ // (probably just an IE <= 8 problem)
+ //
+ // NOTE: nodejs is fine in version 0.8, 0.10 and future versions.
+ if (!Object.setPrototypeOf) (function () {
+ /*jshint proto: true */
+ // @author Andrea Giammarchi - @WebReflection
+ // define into target descriptors from source
+ var copyDescriptors = function (target, source) {
+ getOwnPropertyNames(source).forEach(function (key) {
+ defineProperty(
+ target,
+ key,
+ getOwnPropertyDescriptor(source, key)
+ );
+ });
+ return target;
+ };
+ // used as fallback when no promotion is possible
+ var createAndCopy = function (origin, proto) {
+ return copyDescriptors(create(proto), origin);
+ };
+ var create = Object.create;
+ var defineProperty = Object.defineProperty;
+ var getPrototypeOf = Object.getPrototypeOf;
+ var getOwnPropertyNames = Object.getOwnPropertyNames;
+ var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
+ var proto = Object.prototype;
+ var set, setPrototypeOf;
+
+ try {
+ // this might fail for various reasons
+ // ignore if Chrome cought it at runtime
+ set = getOwnPropertyDescriptor(proto, '__proto__').set;
+ set.call({}, null);
+ // setter not poisoned, it can promote
+ // Firefox, Chrome
+ setPrototypeOf = function (origin, proto) {
+ set.call(origin, proto);
+ return origin;
+ };
+ } catch (e) {
+ // do one or more feature detections
+ set = {__proto__: null};
+ // if proto does not work, needs to fallback
+ // some Opera, Rhino, ducktape
+ if (set instanceof Object) {
+ setPrototypeOf = createAndCopy;
+ } else {
+ // verify if null objects are buggy
+ set.__proto__ = proto;
+ // if null objects are buggy
+ // nodejs 0.8 to 0.10
+ if (set instanceof Object) {
+ setPrototypeOf = function (origin, proto) {
+ // use such bug to promote
+ origin.__proto__ = proto;
+ return origin;
+ };
+ } else {
+ // try to use proto or fallback
+ // Safari, old Firefox, many others
+ setPrototypeOf = function (origin, proto) {
+ // if proto is not null
+ return getPrototypeOf(origin) ?
+ // use __proto__ to promote
+ ((origin.__proto__ = proto), origin) :
+ // otherwise unable to promote: fallback
+ createAndCopy(origin, proto);
+ };
+ }
+ }
+ }
+ Object.setPrototypeOf = setPrototypeOf;
+ }());
+
+ };
+
+ if (typeof define === 'function' && define.amd) {
+ define(main); // RequireJS
+ } else