1 // should work in any browser without browserify
3 if (typeof Promise.prototype.done !== 'function') {
4 Promise.prototype.done = function (onFulfilled, onRejected) {
5 var self = arguments.length ? this.then.apply(this, arguments) : this
6 self.then(null, function (err) {
7 setTimeout(function () {