// should work in any browser without browserifyif(typeofPromise.prototype.done!=='function'){Promise.prototype.done=function(onFulfilled,onRejected){varself=arguments.length?this.then.apply(this,arguments):thisself.then(null,function(err){setTimeout(function(){throwerr},0)})}}