Module 141697

422 characters · in 330757.ed737ade7cc45a1e.js
Dependencies
Required by (1)
Lazily required by (0)none
Requires (0)none
Lazily requires (0)none
Source Raw
function(e){"use strict";var t;e.exports.timeout=function(e,r){var n,i=new t;return Promise.race([e,new Promise(function(e,t){n=setTimeout(function(){t(i)},r)})]).then(function(e){return clearTimeout(n),e},function(e){throw clearTimeout(n),e})},(t=e.exports.TimeoutError=function(){Error.call(this),this.stack=Error().stack,this.message="Timeout"}).prototype=Object.create(Error.prototype),t.prototype.name="TimeoutError"}