diff --git a/dist/browser/index.js b/dist/browser/index.js deleted file mode 100644 index 7843a7a..0000000 --- a/dist/browser/index.js +++ /dev/null @@ -1,322 +0,0 @@ -parcelRequire=function(e,r,t,n){var i,o="function"==typeof parcelRequire&&parcelRequire,u="function"==typeof require&&require;function f(t,n){if(!r[t]){if(!e[t]){var i="function"==typeof parcelRequire&&parcelRequire;if(!n&&i)return i(t,!0);if(o)return o(t,!0);if(u&&"string"==typeof t)return u(t);var c=new Error("Cannot find module '"+t+"'");throw c.code="MODULE_NOT_FOUND",c}p.resolve=function(r){return e[t][1][r]||r},p.cache={};var l=r[t]=new f.Module(t);e[t][0].call(l.exports,p,l,l.exports,this)}return r[t].exports;function p(e){return f(p.resolve(e))}}f.isParcelRequire=!0,f.Module=function(e){this.id=e,this.bundle=f,this.exports={}},f.modules=e,f.cache=r,f.parent=o,f.register=function(r,t){e[r]=[function(e,r){r.exports=t},{}]};for(var c=0;c1?(this.innerErrors=n.map(r=>t(r)),this.stack=`${o}\n\n${this.innerErrors.map((t,e)=>`======= INNER ERROR (${e+1} of ${s}) =======\n\n${r.getErrorReport(t)}`).join("\n\n")}`):(this.innerErrors=null,this.stack=o)}get innerError(){return this.innerErrors?this.innerErrors instanceof Array?0===this.innerErrors.length?null:this.innerErrors[0]:this.innerErrors:null}static rethrow(r){return(...t)=>{throw new this(r,...t)}}}function t(r){try{return r instanceof Error?r:new Error(`Value that is not an instance of Error was thrown: ${r}`)}catch(r){return new Error("Failed to stringify non-instance of Error that was thrown.This is possibly due to the fact that toString() method of the valuedoesn't return a primitive value.")}}exports.NestedError=r,r.getErrorReport="string"==typeof(new Error).stack?r=>r.stack:r=>`${r.name}: ${r.message}`,r.prototype.name="NestedError",exports.toError=t; -},{}],"J7Rg":[function(require,module,exports) { -var o="Expected a function";function t(t,e,n){if("function"!=typeof t)throw new TypeError(o);return setTimeout(function(){t.apply(void 0,n)},e)}module.exports=t; -},{}],"atk5":[function(require,module,exports) { -function e(e){return e}module.exports=e; -},{}],"WIls":[function(require,module,exports) { -function e(e,l,r){switch(r.length){case 0:return e.call(l);case 1:return e.call(l,r[0]);case 2:return e.call(l,r[0],r[1]);case 3:return e.call(l,r[0],r[1],r[2])}return e.apply(l,r)}module.exports=e; -},{}],"ORgC":[function(require,module,exports) { -var r=require("./_apply"),t=Math.max;function a(a,e,n){return e=t(void 0===e?a.length-1:e,0),function(){for(var o=arguments,u=-1,i=t(o.length-e,0),f=Array(i);++u0){if(++o>=r)return arguments[0]}else o=0;return t.apply(void 0,arguments)}}module.exports=t; -},{}],"GA3Z":[function(require,module,exports) { -var e=require("./_baseSetToString"),r=require("./_shortOut"),t=r(e);module.exports=t; -},{"./_baseSetToString":"Wxwx","./_shortOut":"LOwu"}],"Gdal":[function(require,module,exports) { -var e=require("./identity"),r=require("./_overRest"),t=require("./_setToString");function i(i,u){return t(r(i,u,e),i+"")}module.exports=i; -},{"./identity":"atk5","./_overRest":"ORgC","./_setToString":"GA3Z"}],"gfnG":[function(require,module,exports) { -var e=require("./_baseDelay"),r=require("./_baseRest"),u=r(function(r,u){return e(r,1,u)});module.exports=u; -},{"./_baseDelay":"J7Rg","./_baseRest":"Gdal"}],"ZibF":[function(require,module,exports) { -function e(e){return null!=e&&"object"==typeof e}module.exports=e; -},{}],"hyfS":[function(require,module,exports) { -var e=require("./_baseGetTag"),r=require("./isObjectLike"),o="[object Symbol]";function t(t){return"symbol"==typeof t||r(t)&&e(t)==o}module.exports=t; -},{"./_baseGetTag":"r1rA","./isObjectLike":"ZibF"}],"JaQd":[function(require,module,exports) { -var e=require("./isObject"),r=require("./isSymbol"),t=NaN,i=/^\s+|\s+$/g,f=/^[-+]0x[0-9a-f]+$/i,u=/^0b[01]+$/i,n=/^0o[0-7]+$/i,s=parseInt;function a(a){if("number"==typeof a)return a;if(r(a))return t;if(e(a)){var o="function"==typeof a.valueOf?a.valueOf():a;a=e(o)?o+"":o}if("string"!=typeof a)return 0===a?a:+a;a=a.replace(i,"");var l=u.test(a);return l||n.test(a)?s(a.slice(2),l?2:8):f.test(a)?t:+a}module.exports=a; -},{"./isObject":"xwKO","./isSymbol":"hyfS"}],"Nc2p":[function(require,module,exports) { -var e=require("./_baseDelay"),r=require("./_baseRest"),u=require("./toNumber"),t=r(function(r,t,a){return e(r,u(t)||0,a)});module.exports=t; -},{"./_baseDelay":"J7Rg","./_baseRest":"Gdal","./toNumber":"JaQd"}],"roQf":[function(require,module,exports) { -function r(r,n){for(var e=-1,l=null==r?0:r.length,o=0,t=[];++e-1&&t%1==0&&t-1&&r%1==0&&r<=e}module.exports=r; -},{}],"NYtY":[function(require,module,exports) { -var e=require("./_baseGetTag"),t=require("./isLength"),r=require("./isObjectLike"),o="[object Arguments]",b="[object Array]",c="[object Boolean]",j="[object Date]",a="[object Error]",n="[object Function]",i="[object Map]",A="[object Number]",y="[object Object]",u="[object RegExp]",g="[object Set]",l="[object String]",p="[object WeakMap]",s="[object ArrayBuffer]",m="[object DataView]",U="[object Float32Array]",f="[object Float64Array]",q="[object Int8Array]",F="[object Int16Array]",I="[object Int32Array]",d="[object Uint8Array]",h="[object Uint8ClampedArray]",k="[object Uint16Array]",x="[object Uint32Array]",B={};function D(o){return r(o)&&t(o.length)&&!!B[e(o)]}B[U]=B[f]=B[q]=B[F]=B[I]=B[d]=B[h]=B[k]=B[x]=!0,B[o]=B[b]=B[s]=B[c]=B[m]=B[j]=B[a]=B[n]=B[i]=B[A]=B[y]=B[u]=B[g]=B[l]=B[p]=!1,module.exports=D; -},{"./_baseGetTag":"r1rA","./isLength":"mL1V","./isObjectLike":"ZibF"}],"ASYw":[function(require,module,exports) { -function n(n){return function(r){return n(r)}}module.exports=n; -},{}],"G5bk":[function(require,module,exports) { -var e=require("./_freeGlobal"),o="object"==typeof exports&&exports&&!exports.nodeType&&exports,r=o&&"object"==typeof module&&module&&!module.nodeType&&module,t=r&&r.exports===o,p=t&&e.process,u=function(){try{var e=r&&r.require&&r.require("util").types;return e||p&&p.binding&&p.binding("util")}catch(o){}}();module.exports=u; -},{"./_freeGlobal":"f6Xl"}],"RCtT":[function(require,module,exports) { -var e=require("./_baseIsTypedArray"),r=require("./_baseUnary"),a=require("./_nodeUtil"),i=a&&a.isTypedArray,s=i?r(i):e;module.exports=s; -},{"./_baseIsTypedArray":"NYtY","./_baseUnary":"ASYw","./_nodeUtil":"G5bk"}],"VZjL":[function(require,module,exports) { -var e=require("./_baseTimes"),r=require("./isArguments"),t=require("./isArray"),i=require("./isBuffer"),n=require("./_isIndex"),s=require("./isTypedArray"),u=Object.prototype,f=u.hasOwnProperty;function a(u,a){var o=t(u),p=!o&&r(u),y=!o&&!p&&i(u),g=!o&&!p&&!y&&s(u),h=o||p||y||g,l=h?e(u.length,String):[],q=l.length;for(var b in u)!a&&!f.call(u,b)||h&&("length"==b||y&&("offset"==b||"parent"==b)||g&&("buffer"==b||"byteLength"==b||"byteOffset"==b)||n(b,q))||l.push(b);return l}module.exports=a; -},{"./_baseTimes":"EyJ2","./isArguments":"Qziv","./isArray":"zOp4","./isBuffer":"UlFJ","./_isIndex":"U8js","./isTypedArray":"RCtT"}],"g5RI":[function(require,module,exports) { -var t=Object.prototype;function o(o){var r=o&&o.constructor;return o===("function"==typeof r&&r.prototype||t)}module.exports=o; -},{}],"QRZr":[function(require,module,exports) { -function n(n,r){return function(t){return n(r(t))}}module.exports=n; -},{}],"nsWR":[function(require,module,exports) { -var e=require("./_overArg"),r=e(Object.keys,Object);module.exports=r; -},{"./_overArg":"QRZr"}],"mX7V":[function(require,module,exports) { -var r=require("./_isPrototype"),e=require("./_nativeKeys"),t=Object.prototype,o=t.hasOwnProperty;function n(t){if(!r(t))return e(t);var n=[];for(var u in Object(t))o.call(t,u)&&"constructor"!=u&&n.push(u);return n}module.exports=n; -},{"./_isPrototype":"g5RI","./_nativeKeys":"nsWR"}],"K2yx":[function(require,module,exports) { -var e=require("./isFunction"),n=require("./isLength");function r(r){return null!=r&&n(r.length)&&!e(r)}module.exports=r; -},{"./isFunction":"xOlx","./isLength":"mL1V"}],"dUuE":[function(require,module,exports) { -var e=require("./_arrayLikeKeys"),r=require("./_baseKeys"),i=require("./isArrayLike");function u(u){return i(u)?e(u):r(u)}module.exports=u; -},{"./_arrayLikeKeys":"VZjL","./_baseKeys":"mX7V","./isArrayLike":"K2yx"}],"TBo3":[function(require,module,exports) { -var e=require("./_baseFor"),r=require("./keys");function u(u,o){return u&&e(u,o,r)}module.exports=u; -},{"./_baseFor":"VEBJ","./keys":"dUuE"}],"lCSl":[function(require,module,exports) { -var r=require("./isArrayLike");function e(e,n){return function(t,u){if(null==t)return t;if(!r(t))return e(t,u);for(var i=t.length,f=n?i:-1,o=Object(t);(n?f--:++f-1}module.exports=r; -},{"./_assocIndexOf":"zteS"}],"G8aX":[function(require,module,exports) { -var s=require("./_assocIndexOf");function e(e,r){var t=this.__data__,i=s(t,e);return i<0?(++this.size,t.push([e,r])):t[i][1]=r,this}module.exports=e; -},{"./_assocIndexOf":"zteS"}],"ICfp":[function(require,module,exports) { -var e=require("./_listCacheClear"),t=require("./_listCacheDelete"),r=require("./_listCacheGet"),l=require("./_listCacheHas"),o=require("./_listCacheSet");function a(e){var t=-1,r=null==e?0:e.length;for(this.clear();++ts))return!1;var h=c.get(n),g=c.get(f);if(h&&g)return h==f&&g==n;var b=-1,k=!0,q=u&a?new e:void 0;for(c.set(n,f),c.set(f,n);++b0&&u(s)?n>1?a(s,n-1,u,l,i):r(i,s):l||(i[i.length]=s)}return i}module.exports=a; -},{"./_arrayPush":"WiDi","./_isFlattenable":"rOv1"}],"lqP1":[function(require,module,exports) { -var e=require("./_baseFlatten");function n(n){return(null==n?0:n.length)?e(n,1):[]}module.exports=n; -},{"./_baseFlatten":"jrlN"}],"uCW0":[function(require,module,exports) { -var r=require("./_baseKeys"),e=require("./_getTag"),i=require("./isArguments"),t=require("./isArray"),u=require("./isArrayLike"),n=require("./isBuffer"),o=require("./_isPrototype"),s=require("./isTypedArray"),f="[object Map]",a="[object Set]",p=Object.prototype,y=p.hasOwnProperty;function l(p){if(null==p)return!0;if(u(p)&&(t(p)||"string"==typeof p||"function"==typeof p.splice||n(p)||s(p)||i(p)))return!p.length;var l=e(p);if(l==f||l==a)return!p.size;if(o(p))return!r(p).length;for(var q in p)if(y.call(p,q))return!1;return!0}module.exports=l; -},{"./_baseKeys":"mX7V","./_getTag":"gfIQ","./isArguments":"Qziv","./isArray":"zOp4","./isArrayLike":"K2yx","./isBuffer":"UlFJ","./_isPrototype":"g5RI","./isTypedArray":"RCtT"}],"qq0B":[function(require,module,exports) { -var e=require("./_overArg"),r=e(Object.getPrototypeOf,Object);module.exports=r; -},{"./_overArg":"QRZr"}],"EUXB":[function(require,module,exports) { -var t=require("./_baseGetTag"),e=require("./_getPrototype"),r=require("./isObjectLike"),o="[object Object]",c=Function.prototype,n=Object.prototype,u=c.toString,i=n.hasOwnProperty,a=u.call(Object);function l(c){if(!r(c)||t(c)!=o)return!1;var n=e(c);if(null===n)return!0;var l=i.call(n,"constructor")&&n.constructor;return"function"==typeof l&&l instanceof l&&u.call(l)==a}module.exports=l; -},{"./_baseGetTag":"r1rA","./_getPrototype":"qq0B","./isObjectLike":"ZibF"}],"PXzK":[function(require,module,exports) { -var e=require("./_baseGetTag"),r=require("./isObjectLike"),t=require("./isPlainObject"),i="[object DOMException]",n="[object Error]";function o(o){if(!r(o))return!1;var s=e(o);return s==n||s==i||"string"==typeof o.message&&"string"==typeof o.name&&!t(o)}module.exports=o; -},{"./_baseGetTag":"r1rA","./isObjectLike":"ZibF","./isPlainObject":"EUXB"}],"cc7F":[function(require,module,exports) { -function n(n){return null==n}module.exports=n; -},{}],"Mmfe":[function(require,module,exports) { -var r=require("./_baseEach"),e=require("./isArrayLike");function a(a,i){var n=-1,u=e(a)?Array(a.length):[];return r(a,function(r,e,a){u[++n]=i(r,e,a)}),u}module.exports=a; -},{"./_baseEach":"ujNk","./isArrayLike":"K2yx"}],"F9m6":[function(require,module,exports) { -var r=require("./_arrayMap"),e=require("./_baseIteratee"),a=require("./_baseMap"),u=require("./isArray");function i(i,t){return(u(i)?r:a)(i,e(t,3))}module.exports=i; -},{"./_arrayMap":"eKAY","./_baseIteratee":"EAyW","./_baseMap":"Mmfe","./isArray":"zOp4"}],"t6QJ":[function(require,module,exports) { -var t="Expected a function";function r(r){if("function"!=typeof r)throw new TypeError(t);return function(){var t=arguments;switch(t.length){case 0:return!r.call(this);case 1:return!r.call(this,t[0]);case 2:return!r.call(this,t[0],t[1]);case 3:return!r.call(this,t[0],t[1],t[2])}return!r.apply(this,t)}}module.exports=r; -},{}],"rmX6":[function(require,module,exports) { -function o(){}module.exports=o; -},{}],"IIJS":[function(require,module,exports) { -function r(r,e){var n=-1,o=r.length;for(e||(e=Array(o));++ne.length)&&(r=e.length);for(var t=0,n=new Array(r);t0&&void 0!==arguments[0]?arguments[0]:a.default;return new p(this.wrapped.catch(e))}},{key:"all",value:function(){return this.arrayify(!0)}},{key:"simplify",value:function(){return this}},{key:"arrayify",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],t=this.then(function(e){return y(e)});return e?r?t.then(function(){var e=v(regeneratorRuntime.mark(function e(r){var t;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:t=[];case 1:if((0,o.default)(r)){e.next=9;break}return e.t0=t,e.next=5,r.shift();case 5:e.t1=e.sent,e.t0.push.call(e.t0,e.t1),e.next=1;break;case 9:return e.abrupt("return",t);case 10:case"end":return e.stop()}},e)}));return function(r){return e.apply(this,arguments)}}()):t.then(function(e){return Promise.all(e)}):t}},{key:"map",value:function(e){var r=this,t=[];return p.try(v(regeneratorRuntime.mark(function n(){return regeneratorRuntime.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.t0=Promise,n.t1=f.default,n.next=4,r.arrayify();case 4:return n.t2=n.sent,n.t3=function(){var r=v(regeneratorRuntime.mark(function r(n,u){return regeneratorRuntime.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.t0=e,r.next=3,n;case 3:return r.t1=r.sent,r.next=6,(0,r.t0)(r.t1);case 6:t[u]=r.sent;case 7:case"end":return r.stop()}},r)}));return function(e,t){return r.apply(this,arguments)}}(),n.t4=(0,n.t1)(n.t2,n.t3),n.next=9,n.t0.all.call(n.t0,n.t4);case 9:return n.abrupt("return",t);case 10:case"end":return n.stop()}},n)})))}},{key:"finally",value:function(e){return(0,c.default)(e)?new p(this.wrapped.finally(e)):this}},{key:"delay",value:function(e,n){return new p(e<=0?new Promise(function(e){return(0,r.default)(e,n)}):new Promise(function(r){return(0,t.default)(r,e,n)}))}},{key:"filter",value:function(e){return this.arrayify().then(function(){var r=v(regeneratorRuntime.mark(function r(t){var u;return regeneratorRuntime.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,p.map(t,function(){var r=v(regeneratorRuntime.mark(function r(t){return regeneratorRuntime.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.t0=e,r.next=3,t;case 3:return r.t1=r.sent,r.abrupt("return",(0,r.t0)(r.t1));case 5:case"end":return r.stop()}},r)}));return function(e){return r.apply(this,arguments)}}());case 2:return u=r.sent,r.abrupt("return",(0,n.default)(t,function(e,r){return u[r]}));case 4:case"end":return r.stop()}},r)}));return function(e){return r.apply(this,arguments)}}())}},{key:"flatMap",value:function(e){return this.arrayify().then(function(){var r=v(regeneratorRuntime.mark(function r(t){var n,a,o;return regeneratorRuntime.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return n=(0,f.default)(t,function(){var r=v(regeneratorRuntime.mark(function r(t){return regeneratorRuntime.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.t0=e,r.next=3,t;case 3:return r.t1=r.sent,r.abrupt("return",(0,r.t0)(r.t1));case 5:case"end":return r.stop()}},r)}));return function(e){return r.apply(this,arguments)}}()),r.next=3,Promise.all(n);case 3:return a=r.sent,o=(0,u.default)(a),r.abrupt("return",o);case 6:case"end":return r.stop()}},r)}));return function(e){return r.apply(this,arguments)}}())}},{key:"tap",value:function(e){return this.then(function(){var r=v(regeneratorRuntime.mark(function r(t){return regeneratorRuntime.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,e(t);case 2:return r.abrupt("return",t);case 3:case"end":return r.stop()}},r)}));return function(e){return r.apply(this,arguments)}}())}},{key:"tapCatch",value:function(r){return this.catch(function(){var t=v(regeneratorRuntime.mark(function t(n){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,r(n);case 3:t.next=8;break;case 5:throw t.prev=5,t.t0=t.catch(0),new e.NestedError("Error thrown in 'tapCatch'",n,t.t0);case 8:throw n;case 9:case"end":return t.stop()}},t,null,[[0,5]])}));return function(e){return t.apply(this,arguments)}}())}},{key:"tapEach",value:function(e){return this.arrayify(!0).tap(function(){var r=v(regeneratorRuntime.mark(function r(t){return regeneratorRuntime.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,Promise.all((0,f.default)(t,e));case 2:case"end":return r.stop()}},r)}));return function(e){return r.apply(this,arguments)}}())}},{key:"fold",value:function(e,r){return this.arrayify().then(function(){var t=v(regeneratorRuntime.mark(function t(n){var u;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return u=p.resolve(e),t.next=3,Promise.all((0,f.default)(n,function(){var e=v(regeneratorRuntime.mark(function e(t){var n;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t;case 2:n=e.sent,u=u.then(function(e){return r(e,n)});case 4:case"end":return e.stop()}},e)}));return function(r){return e.apply(this,arguments)}}()));case 3:return t.next=5,u;case 5:return t.abrupt("return",t.sent);case 6:case"end":return t.stop()}},t)}));return function(e){return t.apply(this,arguments)}}())}},{key:i,get:function(){return this.wrapped[Symbol.toStringTag]}}],[{key:"resolve",value:function(e){return new p(Promise.resolve(e))}},{key:"reject",value:function(e){return new p(Promise.reject(e))}},{key:"all",value:function(){for(var e=arguments.length,r=new Array(e),t=0;t1?r-1:0),n=1;n1&&void 0!==arguments[1]?arguments[1]:(0,l.default)(s.default),n=!1,u=new Error("No values left after coalescing");return p.map(e,function(e){return p.try(e).then(function(e){return n?null:p.try(t,e).then(function(t){if(n)return null;t&&(n=!0,r=e)})}).catch(function(e){u=e})}).then(function(){if(n)return r;throw u})}},{key:"delay",value:function(e,r){return p.resolve().delay(e,r)}},{key:"filter",value:function(e,r){return p.resolve(e).filter(r)}},{key:"flatMap",value:function(e,r){return p.resolve(e).flatMap(r)}},{key:"fold",value:function(e,r,t){return p.resolve(e).fold(r,t)}}]),p}();exports.default=q; -},{"@robertfischer/ts-nested-error":"S3tB","lodash/defer":"gfnG","lodash/delay":"Nc2p","lodash/filter":"jAUG","lodash/flatten":"lqP1","lodash/identity":"atk5","lodash/isEmpty":"uCW0","lodash/isError":"PXzK","lodash/isFunction":"xOlx","lodash/isNil":"cc7F","lodash/map":"F9m6","lodash/negate":"t6QJ","lodash/noop":"rmX6","lodash/toArray":"SCHp"}],"FhWa":[function(require,module,exports) { -"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=s(require("./fun-promise")),t=require("./types"),r=s(require("lodash/defer")),i=s(require("lodash/noop"));function s(e){return e&&e.__esModule?e:{default:e}}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var r=0;r value)); - } - /** - * Takes a value (or a promise of a value) and returns a promise rejecting - * with that value, after unwrapping as many layers of `PromiseLike` - * wrappers as necessary. - */ - static reject(value) { - return new FunPromise(Promise.reject(value)); - } - /** - * Takes a value (or a promise of a value) and returns a promise rejecting - * with that value, after unwrapping as many layers of `PromiseLike` - * wrappers as necessary. This disregards any existing status. - */ - reject(value) { - return FunPromise.reject(value); - } - then(onfulfilled, onrejected) { - if (isNil_1.default(onrejected)) { - return new FunPromise(this.wrapped.then(onfulfilled)); - } - else { - return new FunPromise(this.wrapped.then(onfulfilled, onrejected)); - } - } - /** - * Attaches a callback for only the rejection of the Promise. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of the callback. - */ - catch(onrejected = identity_1.default) { - return new FunPromise(this.wrapped.catch(onrejected)); - } - static all(...values) { - return FunPromise.resolve(flatten_1.default(values)).all(); - } - all() { - return this.arrayify(true); - } - static try(source, ...args) { - return FunPromise.resolve(source).then((f) => { - if (isEmpty_1.default(args)) { - return f(); - } - else { - return Promise.all(args).then((realArgs) => f(...realArgs)); - } - }); - } - /** - * Unwraps layers of `PromiseLike` wrappers as necessary. - * - * This behavior is actually part of the Promise/A+ spec, but the type system struggles with that fact, - * so this method is a workaround. - * - * In a future version of this library, `FunPromise` will extend `Promise>` instead of - * just `Promise`, which will render this method irrelevant. Unfortunately, Typescript's type system - * doesn't seem capable of handling that reality quite yet, so this is what we get. - */ - simplify() { - return this; - } - /** - * Coerces the resolve value (which must be an `Iterable`) into an array. The `Iterable` requirement - * comes from the `Item` return value: `Item` is equivalent to `never` if `T` is not an `Iterable`. - * - * Note that this function does *NOT* resolve the items within the array unless you pass the first argument - * as `true`. The items are not resolved sequentially unless you also pass a second argument as `true`. - */ - arrayify(resolveValues = false, sequentialResolution = false) { - const aryPromise = this.then((iter) => [ - ...iter, - ]); - if (resolveValues) { - if (sequentialResolution) { - return aryPromise.then((ary) => tslib_1.__awaiter(this, void 0, void 0, function* () { - const results = []; - while (!isEmpty_1.default(ary)) { - results.push(yield ary.shift()); - } - return results; - })); - } - else { - return aryPromise.then((ary) => Promise.all(ary)); - } - } - else { - return aryPromise; - } - } - /** - * Given a mapping function, apply the mapping function to each element of the promise's resolved value, - * and return an array with the results of the mapping. If any of the mapping results are rejected, - * the entire operation will be rejected. - * - * The order of the elements in the result correspond to the order of the elements in the promise's - * resolved value. However, the resolution order is not guaranteed. For example, although the - * output at index 0 will hold the mapping of the input element at index 0, it is not guaranteed that - * the mapping of index 0 will be awaited before the mapping of index 1. - */ - map(mapper) { - const results = []; - return FunPromise.try(() => tslib_1.__awaiter(this, void 0, void 0, function* () { - yield Promise.all(map_1.default(yield this.arrayify(), (value, idx) => tslib_1.__awaiter(this, void 0, void 0, function* () { - results[idx] = yield mapper(yield value); - }))); - return results; - })); - } - /** - * Equivalent to `FunPromise.resolve(values).map(mapper)`. - */ - static map(values, mapper) { - return FunPromise.resolve(values).map(mapper); - } - /** - * Required to implement `Promise`, but you almost certainly don't care about it. - * - * All the same, it returns the string tag of the underlying promise. - */ - get [Symbol.toStringTag]() { - return this.wrapped[Symbol.toStringTag]; - } - finally(onfinally) { - if (isFunction_1.default(onfinally)) { - return new FunPromise(this.wrapped.finally(onfinally)); - } - else { - return this; - } - } - /** - * Given a [[`PromisableIterable`]] whose values are nullary functions returning [[Promisable|`Promisable`]], - * this executes all the functions simultaneously and returns the first whose return value passes the provided test. - * The default test returns true if the value is not `null` or `undefined`. - * - * If no function resolves successfully, the last seen rejection is thrown. If some functions resolve but some reject, - * and none of the resolved values pass the test, then the last seen rejection is thrown. - * - * If all the functions resolve but to a value but no value passes the test, then this rejects with an error saying as much. - */ - static coalesce(fns, test = negate_1.default(isNil_1.default)) { - let resolved = false; - let lastSeenReason = new Error("No values left after coalescing"); - let resolveValue; - return FunPromise.map(fns, (fn) => FunPromise.try(fn) - .then((result) => { - if (resolved) - return null; - return FunPromise.try(test, result).then((testResult) => { - if (resolved) - return null; - if (testResult) { - resolved = true; - resolveValue = result; - } - }); - }) - .catch((e) => { - lastSeenReason = e; - })).then(() => { - if (resolved) { - return resolveValue; - } - else { - throw lastSeenReason; - } - }); - } - static delay(waitTimeMs, returnValue) { - return FunPromise.resolve().delay(waitTimeMs, returnValue); - } - /** - * Waits for `waitTimeMs` milliseconds before resolving. If `returnValue` is provided, resolves with the provided value. - * - * If `waitTimeMs` is less than or equal to zero, then it simply defers until the call stack is clear. - */ - delay(waitTimeMs, returnValue) { - if (waitTimeMs <= 0) { - return new FunPromise(new Promise((resolve) => defer_1.default(resolve, returnValue))); - } - else { - return new FunPromise(new Promise((resolve) => delay_1.default(resolve, waitTimeMs, returnValue))); - } - } - /** - * Given a filtering function, apply the filtering function to each element of the promise's resolved value, - * and return an array with the values for which the filtering function returns `true`. If any of the filtering - * results are rejected, the entire operation will be rejected. - * - * The order of the elements in the result are stable with regard to the order of the elements in the promise's - * resolved value. That is, if `X < Y` and `input[X]` and `input[Y]` are both in the input, and `input[X]` and - * `input[Y]` both pass the filtering function, then the output index of `input[X]` will be less than the output - * index of `input[Y]`. However, the resolution order is not guaranteed: that is, `input[Y]` may be resolved and - * tested before `input[X]` even though `input[X]` has a lower output index than `input[Y]`. - */ - filter(test) { - return this.arrayify().then((ary) => tslib_1.__awaiter(this, void 0, void 0, function* () { - const results = yield FunPromise.map(ary, (it) => tslib_1.__awaiter(this, void 0, void 0, function* () { return test(yield it); })); - // @ts-ignore - return filter_1.default(ary, (it, idx) => results[idx]); - })); - } - /** - * Equivalent to `FunPromise.resolve(items).filter(test)`. - */ - static filter(items, test) { - return FunPromise.resolve(items).filter(test); - } - /** - * Given a mapping function, apply the mapping function to each element of the promise's resolved value, - * and return an array with the concatenated results of the mapping. If any of the mapping results are - * rejected, the entire operation will be rejected. - * - * The order of the elements in the result correspond to the order of the elements in the promise's - * resolved value. However, the resolution order is not guaranteed. - */ - flatMap(mapper) { - return this.arrayify().then((ary) => tslib_1.__awaiter(this, void 0, void 0, function* () { - const promises = map_1.default(ary, (value) => tslib_1.__awaiter(this, void 0, void 0, function* () { return mapper(yield value); })); - const resolved = yield Promise.all(promises); - const flattened = flatten_1.default(resolved); - return flattened; - })); - } - /** - * Equivalent to `FunPromise.resolve(values).flatMap(mapper)`. - */ - static flatMap(values, mapper) { - return FunPromise.resolve(values).flatMap(mapper); - } - /** - * Access the resolved value without changing it. Note that if the callback rejects (ie: throws), - * then the resulting promise will be rejected. - */ - tap(callback) { - return this.then((val) => tslib_1.__awaiter(this, void 0, void 0, function* () { - yield callback(val); - return val; - })); - } - /** - * Access the rejection reason without changing it. Note that if the callback itself rejects (ie: throws), - * both rejection reasons will be capture in a single [[`NestedError`]]. - */ - tapCatch(callback) { - return this.catch((err) => tslib_1.__awaiter(this, void 0, void 0, function* () { - try { - yield callback(err); - } - catch (err2) { - throw new ts_nested_error_1.NestedError("Error thrown in 'tapCatch'", err, err2); - } - throw err; - })); - } - /** - * Access each of the resolved values of a resolved iterable without changing it. Note that if the callback rejects (ie: throws), - * then the resulting promise will be rejected. - */ - tapEach(callback) { - return this.arrayify(true).tap((ary) => tslib_1.__awaiter(this, void 0, void 0, function* () { - yield Promise.all(map_1.default(ary, callback)); - })); - } - /** - * Given an initial value and an accumulator function, apply the accumlator function to each element of the promise's resolved value, - * passing in the current value and the result. Returns an array with the result of the accumulation. If any of the promise's values are - * rejected, the entire operation will be rejected. - * - * The resolution order is not guaranteed. The accumulator function will be passed values as those values resolve. - */ - fold(initialValue, accumulator) { - return this.arrayify().then((ary) => tslib_1.__awaiter(this, void 0, void 0, function* () { - let memoPromise = FunPromise.resolve(initialValue); - yield Promise.all(map_1.default(ary, (promisableValue) => tslib_1.__awaiter(this, void 0, void 0, function* () { - const value = yield promisableValue; - memoPromise = memoPromise.then((memo) => accumulator(memo, value)); - }))); - return yield memoPromise; - })); - } - /** - * Equivalent to `FunPromise.resolve(values).fold(initialValue, accumulator)`. - */ - static fold(values, initialValue, accumulator) { - return FunPromise.resolve(values).fold(initialValue, accumulator); - } - } - exports.default = FunPromise; -}); -/** @format */ -define("src/deferral", ["require", "exports", "src/fun-promise", "src/types", "lodash/defer", "lodash/noop"], function (require, exports, fun_promise_1, types_1, defer_2, noop_1) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - /** - * A class that is an "inside-out" [[`FunPromise`]]: the `resolve` and `reject` functions - * from the callback are exposed as properties, and are therefore able to be called by - * caller's code. - * - * Note that after the first call to either `resolve` or `reject`, the underlying promise - * is settled. Any subsequent call to either `resolve` or `reject` is guaranteed to be - * a no-op. - */ - class Deferral { - /** - * Constructs a new promise and exposes its resolve - * and reject functions. - */ - constructor() { - /** - * The promise whose state is determined by `resolve` and `reject`. - */ - Object.defineProperty(this, "promise", { - enumerable: true, - configurable: true, - writable: true, - value: void 0 - }); - /** - * The state of `promise`. - */ - Object.defineProperty(this, "stateValue", { - enumerable: true, - configurable: true, - writable: true, - value: types_1.PromiseState.Pending - }); - /** - * The function used to resolve [[`promise`]]. - */ - Object.defineProperty(this, "resolver", { - enumerable: true, - configurable: true, - writable: true, - value: null - }); - /** - * The function used to reject [[`promise`]]. - */ - Object.defineProperty(this, "rejector", { - enumerable: true, - configurable: true, - writable: true, - value: null - }); - this.promise = new fun_promise_1.default(new Promise((resolve, reject) => { - this.resolver = resolve; - this.rejector = reject; - })); - } - /** - * Provides the state of `promise`. - */ - get state() { - return this.stateValue; - } - /** - * Whether `promise` is in the process of resolving or rejecting. - */ - get isSettling() { - switch (this.stateValue) { - case types_1.PromiseState.Resolving: - return true; - case types_1.PromiseState.Rejecting: - return true; - default: - return false; - } - } - /** - * Whether `promise` has resolved or rejected. - */ - get isSettled() { - switch (this.stateValue) { - case types_1.PromiseState.Resolved: - return true; - case types_1.PromiseState.Rejected: - return true; - default: - return false; - } - } - /** - * Whether `promise` has resolved. - */ - get isResolved() { - return this.stateValue === types_1.PromiseState.Resolved; - } - /** - * Whether `promise` was rejected. - */ - get isRejected() { - return this.stateValue === types_1.PromiseState.Rejected; - } - /** - * Resolves `promise` with the given value. - */ - resolve(it) { - const { resolver } = this; - if (resolver) { - try { - const { rejector } = this; - this.stateValue = types_1.PromiseState.Resolving; - defer_2.default(() => { - try { - resolver(it); - this.stateValue = types_1.PromiseState.Resolved; - } - catch (e) { - if (rejector) { - this.rejector = rejector; - this.reject(e); - } - else { - console.warn(`Uncaught exception during resolution`, e); - } - } - }); - } - catch (e) { - this.reject(e); - } - finally { - this.resolver = null; - this.rejector = null; - } - } - return this.promise; - } - /** - * Rejects `promise` with the given cause. - */ - reject(e) { - const { rejector } = this; - if (rejector) { - try { - this.stateValue = types_1.PromiseState.Rejecting; - defer_2.default(() => { - try { - rejector(e); - } - finally { - this.stateValue = types_1.PromiseState.Rejected; - } - }); - } - finally { - this.resolver = null; - this.rejector = null; - } - } - return this.promise; - } - /** - * Whether or not the deferral is cancelled. - */ - get isCancelled() { - return !this.isSettled && this.resolver === null && this.resolver === null; - } - /** - * Cancels the deferral. If the deferral is not settled, its callbacks will - * never be called. If the deferral is settled or cancelled, this is a noop. - */ - cancel() { - if (this.isSettled) - return; - this.stateValue = types_1.PromiseState.Cancelled; - this.resolver = null; - this.rejector = null; - this.promise.catch(noop_1.default); // Suppress "UnhandledException" errors. - } - } - exports.default = Deferral; -}); -/** - * @format - */ -define("index", ["require", "exports", "tslib", "src/types", "src/deferral", "src/fun-promise"], function (require, exports, tslib_2, types_2, deferral_1, fun_promise_2) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - /** - * Re-exports everything from [`src/types`|_src_types_.html], [`src/fun-promise`|_src_fun-promise_.html], and [`src/deferral`|_src_deferral_.html]. - * - * @packageDocumentation - */ - tslib_2.__exportStar(types_2, exports); - tslib_2.__exportStar(deferral_1, exports); - tslib_2.__exportStar(fun_promise_2, exports); -}); -/** @format */ -define("src/fun-promise.test", ["require", "exports", "tslib", "src/fun-promise", "lodash", "@robertfischer/ts-nested-error"], function (require, exports, tslib_3, fun_promise_3, lodash_1, ts_nested_error_2) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - const tokenPromise = new Promise((resolve) => resolve(true)); - const tokenFunPromise = new fun_promise_3.default(tokenPromise); - describe("FunPromise", () => { - it("can be constructed and resolved", () => tslib_3.__awaiter(void 0, void 0, void 0, function* () { - yield expect(new fun_promise_3.default(tokenPromise)).resolves.toBe(true); - })); - describe("resolve", () => { - lodash_1.default.forEach({ static: fun_promise_3.default, instance: tokenFunPromise }, (impl, name) => { - describe(name, () => { - describe("resolves correctly", () => { - it("with a value", () => tslib_3.__awaiter(void 0, void 0, void 0, function* () { - yield expect(impl.resolve(tokenPromise)).resolves.toBe(true); - })); - it("without a value", () => tslib_3.__awaiter(void 0, void 0, void 0, function* () { - yield expect(impl.resolve()).resolves.toBeNil(); - })); - it("rejects when provided a rejection", () => tslib_3.__awaiter(void 0, void 0, void 0, function* () { - yield expect(impl.resolve(Promise.reject("BOOM!"))).rejects.toBe("BOOM!"); - })); - }); - }); - }); - }); - describe("then", () => { - it("works without onrejected", () => tslib_3.__awaiter(void 0, void 0, void 0, function* () { - yield expect(tokenFunPromise.then(lodash_1.default.identity)).resolves.toBe(true); - })); - }); - describe("catch", () => { - it("handles rejections", () => tslib_3.__awaiter(void 0, void 0, void 0, function* () { - yield expect(tokenFunPromise - .then(() => Promise.reject("BOOM!")) - .catch((e) => { - expect(e).toBe("BOOM!"); - return "DONE!"; - })).resolves.toBe("DONE!"); - })); - it("returns the error when not passed an argument", () => tslib_3.__awaiter(void 0, void 0, void 0, function* () { - const error = new Error("BOOM!"); - yield expect(tokenFunPromise.then(() => Promise.reject(error)).catch()).resolves.toBe(error); - })); - }); - describe("arrayify", () => { - it("basically works", () => tslib_3.__awaiter(void 0, void 0, void 0, function* () { - const value = [1, 2, 3, 4]; - yield expect(fun_promise_3.default.resolve(value).arrayify()).resolves.toStrictEqual(value); - })); - it("returns a clone", () => tslib_3.__awaiter(void 0, void 0, void 0, function* () { - const value = [1, 2, 3, 4]; - yield expect(fun_promise_3.default.resolve(value) - .arrayify() - .then((it) => { - it.pop(); - return it; - })).resolves.not.toBe(value); - expect(value).toHaveLength(4); - })); - it("does not resolve values when called without an argument", () => tslib_3.__awaiter(void 0, void 0, void 0, function* () { - const rejection = Promise.reject("BOOM!"); - try { - yield expect(fun_promise_3.default.resolve([1, 2, rejection]).arrayify()).resolves.toBeArrayOfSize(3); - } - finally { - rejection.catch((e) => { }); // Disarm the rejection - } - })); - it("resolves values when called with the sole argument `true`", () => tslib_3.__awaiter(void 0, void 0, void 0, function* () { - yield expect(fun_promise_3.default.resolve([ - Promise.resolve(1), - fun_promise_3.default.resolve(2), - ]).arrayify(true)).resolves.toEqual([1, 2]); - })); - it("rejects values when called with the sole argument `true` and a rejection in the mix", () => tslib_3.__awaiter(void 0, void 0, void 0, function* () { - const rejection = Promise.reject("BOOM!"); - yield expect(fun_promise_3.default.resolve([1, 2, rejection]).arrayify(true)).rejects.toBe("BOOM!"); - })); - it("rejects values in order when called with the arguments `(true, true)`", () => tslib_3.__awaiter(void 0, void 0, void 0, function* () { - const rejection1 = Promise.reject("BOOM!"); - const rejection2 = Promise.reject("BANG!"); - try { - yield expect(fun_promise_3.default.resolve([1, 2, rejection1, rejection2]).arrayify(true, true)).rejects.toBe("BOOM!"); - } - finally { - rejection1.catch((e) => { }); // Disarm the rejection - rejection2.catch((e) => { }); // Disarm the rejection - } - })); - it("resolves values in order when called with the arguments `(true, true)`", () => tslib_3.__awaiter(void 0, void 0, void 0, function* () { - let sawFirst = false; - let sawSecond = false; - let sawThird = false; - let sawFourth = false; - yield expect(fun_promise_3.default.resolve([ - fun_promise_3.default.try(() => { - expect(sawFirst).toBe(false); - expect(sawSecond).toBe(false); - expect(sawThird).toBe(false); - expect(sawFourth).toBe(false); - sawFirst = true; - return 1; - }), - fun_promise_3.default.try(() => { - expect(sawFirst).toBe(true); - expect(sawSecond).toBe(false); - expect(sawThird).toBe(false); - expect(sawFourth).toBe(false); - sawSecond = true; - return 2; - }), - fun_promise_3.default.try(() => { - expect(sawFirst).toBe(true); - expect(sawSecond).toBe(true); - expect(sawThird).toBe(false); - expect(sawFourth).toBe(false); - sawThird = true; - return 3; - }), - fun_promise_3.default.try(() => { - expect(sawFirst).toBe(true); - expect(sawSecond).toBe(true); - expect(sawThird).toBe(true); - expect(sawFourth).toBe(false); - sawFourth = true; - return 4; - }), - ]).arrayify(true, true)).resolves.toStrictEqual([1, 2, 3, 4]); - expect(sawFirst).toBe(true); - expect(sawSecond).toBe(true); - expect(sawThird).toBe(true); - expect(sawFourth).toBe(true); - })); - }); - describe("all", () => { - lodash_1.default.forEach([true, false], (staticVersion) => { - describe(staticVersion ? "static" : "instance", () => { - describe("basically works", () => { - lodash_1.default.times(10, (argCount) => { - const simpleArgs = lodash_1.default.times(argCount, (i) => Math.pow(2, i)); - function runAll(args) { - if (staticVersion) { - return fun_promise_3.default.all(args); - } - else { - return fun_promise_3.default.resolve(args).all(); - } - } - it(`for ${argCount} arguments`, () => tslib_3.__awaiter(void 0, void 0, void 0, function* () { - yield expect(runAll(simpleArgs)).resolves.toStrictEqual(simpleArgs); - })); - }); - }); - }); - }); - }); - describe("try", () => { - it("basically works", () => tslib_3.__awaiter(void 0, void 0, void 0, function* () { - yield expect(fun_promise_3.default.try(() => true)).resolves.toBe(true); - })); - it("works with one argument", () => tslib_3.__awaiter(void 0, void 0, void 0, function* () { - yield expect(fun_promise_3.default.try((i) => i, 42)).resolves.toBe(42); - })); - it("explodes properly", () => tslib_3.__awaiter(void 0, void 0, void 0, function* () { - yield expect(fun_promise_3.default.try(() => Promise.reject("BOOM!"))).rejects.toBe("BOOM!"); - })); - }); - describe("map", () => { - lodash_1.default.forEach([true, false], (staticVersion) => { - describe(staticVersion ? "static" : "instance", () => { - function runMap(args, mapper) { - if (staticVersion) { - return fun_promise_3.default.map(args, mapper); - } - else { - return fun_promise_3.default.resolve(args).map(mapper); - } - } - it("basically works", () => tslib_3.__awaiter(void 0, void 0, void 0, function* () { - yield expect(runMap(["Hello", "Goodbye"], (it) => `${it}, World!`)).resolves.toStrictEqual(["Hello, World!", "Goodbye, World!"]); - })); - it("works with some test values", () => tslib_3.__awaiter(void 0, void 0, void 0, function* () { - const defaultValues = [1, 2, 4, 8, 16]; - const defaultMapper = (it) => { - if (Math.random() < 0.5) { - return Promise.resolve(it * 2); - } - else { - return it * 2; - } - }; - yield expect(runMap(defaultValues, defaultMapper)).resolves.toStrictEqual([2, 4, 8, 16, 32]); - })); - }); - }); - }); - describe("Symbol.toStringTag", () => { - it("is the same as the promise passed in", () => { - const promise = new Promise((resolve) => resolve()); - const promiseTag = promise[Symbol.toStringTag]; - expect(promiseTag).not.toBeNil(); - expect(new fun_promise_3.default(promise)[Symbol.toStringTag]).toBe(promiseTag); - }); - }); - describe("finally", () => { - it("returns the same promise when given no arguments", () => { - expect(tokenFunPromise.finally()).toBe(tokenFunPromise); - }); - it("executes on resolution", () => tslib_3.__awaiter(void 0, void 0, void 0, function* () { - let finallyExecuted = false; - yield expect(fun_promise_3.default.resolve(false).finally(() => { - finallyExecuted = true; - })).resolves.toBe(false); - expect(finallyExecuted).toBe(true); - })); - it("executes on rejection", () => tslib_3.__awaiter(void 0, void 0, void 0, function* () { - let finallyExecuted = false; - yield expect(fun_promise_3.default.reject("BOOM!").finally(() => { - finallyExecuted = true; - })).rejects.toBe("BOOM!"); - expect(finallyExecuted).toBe(true); - })); - }); - describe("reject", () => { - lodash_1.default.forEach({ static: fun_promise_3.default, instance: tokenFunPromise }, (impl, name) => { - describe(name, () => { - it("rejects correctly", () => tslib_3.__awaiter(void 0, void 0, void 0, function* () { - yield expect(impl.reject(true)).rejects.toBe(true); - })); - it("doesn't change the object that is rejected", () => tslib_3.__awaiter(void 0, void 0, void 0, function* () { - const reason = { foo: true, bar: 42 }; - yield expect(impl.reject(reason)).rejects.toBe(reason); - })); - }); - }); - }); - describe("coalesce", () => { - function runCoalesce(args, test) { - return fun_promise_3.default.coalesce(args, test); - } - it("basically works", () => tslib_3.__awaiter(void 0, void 0, void 0, function* () { - yield expect(runCoalesce([() => null, Promise.resolve(() => true)])).resolves.toBe(true); - })); - it("returns the first resolving value", () => tslib_3.__awaiter(void 0, void 0, void 0, function* () { - yield expect(runCoalesce([() => fun_promise_3.default.delay(1000).resolve(true), () => false])).resolves.toBe(false); - })); - it("returns the value that passes the test", () => tslib_3.__awaiter(void 0, void 0, void 0, function* () { - yield expect(runCoalesce([() => 2, () => 4], (it) => it > 2)).resolves.toBe(4); - })); - it("throws the error if nothing passes the test", () => tslib_3.__awaiter(void 0, void 0, void 0, function* () { - yield expect(runCoalesce([() => Promise.reject("BOOM!"), () => 4], (it) => it > 4)).rejects.toBe("BOOM!"); - })); - it("punts appropriately after the first resolution", () => tslib_3.__awaiter(void 0, void 0, void 0, function* () { - yield expect(runCoalesce(lodash_1.default.times(3, (idx) => () => idx))).resolves.toBe(0); - })); - }); - describe("delay", () => { - lodash_1.default.forEach([true, false], (staticVersion) => { - describe(staticVersion ? "static" : "instance", () => { - lodash_1.default.forEach([-1000, -1, 0, 1, 1000], (delayMs) => { - describe(`When requesting a delay of ${delayMs} milliseconds`, () => { - function runDelay(arg) { - if (staticVersion) { - return fun_promise_3.default.delay(delayMs, arg); - } - else { - return fun_promise_3.default.resolve().delay(delayMs, arg); - } - } - describe("basically works", () => { - it("with no arg", () => tslib_3.__awaiter(void 0, void 0, void 0, function* () { - yield expect(runDelay()).resolves; - })); - it("with one arg", () => tslib_3.__awaiter(void 0, void 0, void 0, function* () { - yield expect(runDelay(1000)).resolves.toBe(1000); - })); - }); - }); - }); - }); - }); - }); - describe("simplify", () => { - it("basically works", () => tslib_3.__awaiter(void 0, void 0, void 0, function* () { - yield expect(new fun_promise_3.default(Promise.resolve(Promise.resolve(true))).simplify()).resolves.toBe(true); - })); - }); - describe("filter", () => { - lodash_1.default.forEach([true, false], (staticVersion) => { - describe(staticVersion ? "static" : "instance", () => { - const defaultValues = [ - 1, - true, - {}, - null, - Promise.resolve(null), - Promise.resolve(), - "Hello, Dolly!", - ]; - const defaultExpect = [1, true, {}, "Hello, Dolly!"]; - const defaultTest = (it) => !lodash_1.default.isNil(it); - function doFilter(values = defaultValues, test = defaultTest) { - if (staticVersion) { - return fun_promise_3.default.filter(values, test); - } - else { - return fun_promise_3.default.resolve(values).filter(test); - } - } - it("basically works", () => tslib_3.__awaiter(void 0, void 0, void 0, function* () { - yield expect(doFilter()).resolves.not.toBeEmpty(); - yield expect(doFilter()).resolves.toBeArrayOfSize(4); - })); - }); - }); - }); - describe("flatMap", () => { - lodash_1.default.forEach([true, false], (staticVersion) => { - describe(staticVersion ? "static" : "instance", () => { - const defaultValues = [ - 1, - true, - {}, - null, - Promise.resolve(null), - Promise.resolve(), - "Hello, Dolly!", - ]; - const defaultMapper = (it) => { - if (lodash_1.default.isNil(it)) { - return []; - } - else { - return [it]; - } - }; - const defaultExpect = [1, true, {}, "Hello, Dolly!"]; - function doFlatMap(values = defaultValues, mapper = defaultMapper) { - if (staticVersion) { - return fun_promise_3.default.flatMap(values, mapper); - } - else { - return fun_promise_3.default.resolve(values).flatMap(mapper); - } - } - it("basically works", () => tslib_3.__awaiter(void 0, void 0, void 0, function* () { - yield expect(doFlatMap()).resolves.toStrictEqual(defaultExpect); - })); - }); - }); - }); - describe("tap", () => { - it("basically works", () => tslib_3.__awaiter(void 0, void 0, void 0, function* () { - let sawTap = false; - yield expect(tokenFunPromise.tap((val) => { - expect(val).toBe(true); - sawTap = true; - return false; - })).resolves.toBe(true); - expect(sawTap).toBe(true); - })); - it("rejects if it throws an exception", () => tslib_3.__awaiter(void 0, void 0, void 0, function* () { - let sawTap = false; - yield expect(tokenFunPromise.tap((val) => { - sawTap = true; - throw "BOOM!"; - })).rejects.toBe("BOOM!"); - expect(sawTap).toBe(true); - })); - }); - describe("fold", () => { - lodash_1.default.forEach([true, false], (staticVersion) => { - describe(staticVersion ? "static" : "instance", () => { - const defaultValues = [1, 2, 3, 4, 5]; - function doFold(values = defaultValues, initialValue = 0, accumulator = (a, b) => a + b) { - if (staticVersion) { - return fun_promise_3.default.fold(values, initialValue, accumulator); - } - else { - return fun_promise_3.default.resolve(values).fold(initialValue, accumulator); - } - } - it("basically works", () => tslib_3.__awaiter(void 0, void 0, void 0, function* () { - const values = [1, 2, 3, 4, 5]; - yield expect(doFold()).resolves.toBe(1 + 2 + 3 + 4 + 5); - })); - }); - }); - }); - describe("tapCatch", () => { - it("basically works", () => tslib_3.__awaiter(void 0, void 0, void 0, function* () { - let sawTapCatch = false; - yield expect(fun_promise_3.default.reject("BOOM!").tapCatch((e) => { - sawTapCatch = true; - expect(e).toBe("BOOM!"); - return "BANG!"; - })).rejects.toBe("BOOM!"); - expect(sawTapCatch).toBe(true); - })); - it("nests explosions", () => tslib_3.__awaiter(void 0, void 0, void 0, function* () { - let sawCatch = false; - const err1 = new Error("BOOM!"); - const err2 = new Error("BANG!"); - yield expect(fun_promise_3.default.reject(err1) - .tapCatch((e) => { - throw err2; - }) - .catch((e) => { - sawCatch = true; - expect(e).toBeInstanceOf(ts_nested_error_2.NestedError); - expect(e).toHaveProperty("innerErrors"); - expect(e.innerErrors).toHaveLength(2); - expect(e.innerErrors).toEqual([err1, err2]); - return "Hello!"; - })).resolves.toBe("Hello!"); - expect(sawCatch).toBe(true); - })); - }); - describe("tapEach", () => { - it("basically works", () => tslib_3.__awaiter(void 0, void 0, void 0, function* () { - const values = [ - 123, - Promise.resolve(true), - "Hello, Dolly!", - null, - undefined, - ]; - const funPromise = fun_promise_3.default.resolve(values); - let count = 0; - yield expect(funPromise.tapEach(() => { - count++; - })).resolves.toEqual(yield Promise.all(values)); - expect(count).toBe(values.length); - })); - }); - }); -}); -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/docs/.nojekyll b/docs/.nojekyll deleted file mode 100644 index e69de29..0000000 diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md deleted file mode 100644 index f9b5de2..0000000 --- a/docs/CHANGELOG.md +++ /dev/null @@ -1,56 +0,0 @@ -fun-promises Changelog - -## [1.2.0](https://github.com/RobertFischer/fun-promises/compare/v1.1.0...v1.2.0) (2020-12-03) - - -### Features - -* **fold:** implements fold in case map and filter don't cut it ([86c010f](https://github.com/RobertFischer/fun-promises/commit/86c010ff5f934602a2a964cb71ebb73697ed7c2a)), closes [#12](https://github.com/RobertFischer/fun-promises/issues/12) -* **tap:** implement 'tap' for peeking at values ([0f4816a](https://github.com/RobertFischer/fun-promises/commit/0f4816ab42fd9f18bf91e179d2c03fed25822f11)) - - -### Reverts - -* **release:** the cleanup caused a problem with the autocommitting ([6c03637](https://github.com/RobertFischer/fun-promises/commit/6c03637137923e0581a4a736bcb6bd4aa25c77d4)) - -## [1.2.0-rc.2](https://github.com/RobertFischer/fun-promises/compare/v1.2.0-rc.1...v1.2.0-rc.2) (2020-12-02) - - -### Features - -* **fold:** implements fold in case map and filter don't cut it ([86c010f](https://github.com/RobertFischer/fun-promises/commit/86c010ff5f934602a2a964cb71ebb73697ed7c2a)), closes [#12](https://github.com/RobertFischer/fun-promises/issues/12) - -## [1.2.0-rc.1](https://github.com/RobertFischer/fun-promises/compare/v1.1.0...v1.2.0-rc.1) (2020-12-02) - - -### Features - -* **tap:** implement 'tap' for peeking at values ([0f4816a](https://github.com/RobertFischer/fun-promises/commit/0f4816ab42fd9f18bf91e179d2c03fed25822f11)) - - -### Reverts - -* **release:** the cleanup caused a problem with the autocommitting ([6c03637](https://github.com/RobertFischer/fun-promises/commit/6c03637137923e0581a4a736bcb6bd4aa25c77d4)) - -## [1.1.0-rc.2](https://github.com/RobertFischer/fun-promises/compare/v1.1.0-rc.1...v1.1.0-rc.2) (2020-12-02) - - -### Features - -* **tap:** implement 'tap' for peeking at values ([ce059bd](https://github.com/RobertFischer/fun-promises/commit/ce059bdb12c4706f8bf8189d5b09dadae740fa47)) - - -### Reverts - -* **release:** the cleanup caused a problem with the autocommitting ([c9ad636](https://github.com/RobertFischer/fun-promises/commit/c9ad636762e510ce0218f4c13b506cac05f4ab0f)) - - - -fun-promises Changelog - -## [1.0.0-rc.3](https://github.com/RobertFischer/fun-promises/compare/v1.0.0-rc.2...v1.0.0-rc.3) (2020-11-12) - -### Features - -- **flatmap and join:** implement the flatMap(Seq) and join methods - ([0f699e7](https://github.com/RobertFischer/fun-promises/commit/0f699e767aae76e46ade4b9ae9019f457c9b8450)) diff --git a/docs/assets/css/main.css b/docs/assets/css/main.css deleted file mode 100644 index 3c0dcab..0000000 --- a/docs/assets/css/main.css +++ /dev/null @@ -1 +0,0 @@ -/*! normalize.css v1.1.3 | MIT License | git.io/normalize */article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,video{display:inline-block;*display:inline;*zoom:1}audio:not([controls]){display:none;height:0}[hidden]{display:none}html{font-size:100%;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;font-family:sans-serif}button,input,select,textarea{font-family:sans-serif}body{margin:0}a:focus{outline:thin dotted}a:active,a:hover{outline:0}h1{font-size:2em;margin:.67em 0}h2{font-size:1.5em;margin:.83em 0}h3{font-size:1.17em;margin:1em 0}h4,.tsd-index-panel h3{font-size:1em;margin:1.33em 0}h5{font-size:.83em;margin:1.67em 0}h6{font-size:.67em;margin:2.33em 0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:bold}blockquote{margin:1em 40px}dfn{font-style:italic}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}mark{background:#ff0;color:#000}p,pre{margin:1em 0}code,kbd,pre,samp{font-family:monospace,serif;_font-family:"courier new",monospace;font-size:1em}pre{white-space:pre;white-space:pre-wrap;word-wrap:break-word}q{quotes:none}q:before,q:after{content:"";content:none}small{font-size:80%}sub{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline;top:-0.5em}sub{bottom:-0.25em}dl,menu,ol,ul{margin:1em 0}dd{margin:0 0 0 40px}menu,ol,ul{padding:0 0 0 40px}nav ul,nav ol{list-style:none;list-style-image:none}img{border:0;-ms-interpolation-mode:bicubic}svg:not(:root){overflow:hidden}figure,form{margin:0}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0;white-space:normal;*margin-left:-7px}button,input,select,textarea{font-size:100%;margin:0;vertical-align:baseline;*vertical-align:middle}button,input{line-height:normal}button,select{text-transform:none}button,html input[type=button]{-webkit-appearance:button;cursor:pointer;*overflow:visible}input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer;*overflow:visible}button[disabled],html input[disabled]{cursor:default}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0;*height:13px;*width:13px}input[type=search]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}textarea{overflow:auto;vertical-align:top}table{border-collapse:collapse;border-spacing:0}.hljs{display:inline-block;padding:.5em;background:#fff;color:#000}.hljs-comment,.hljs-annotation,.hljs-template_comment,.diff .hljs-header,.hljs-chunk,.apache .hljs-cbracket{color:green}.hljs-keyword,.hljs-id,.hljs-built_in,.css .smalltalk .hljs-class,.hljs-winutils,.bash .hljs-variable,.tex .hljs-command,.hljs-request,.hljs-status,.nginx .hljs-title{color:blue}.xml .hljs-tag{color:blue}.xml .hljs-tag .hljs-value{color:blue}.hljs-string,.hljs-title,.hljs-parent,.hljs-tag .hljs-value,.hljs-rules .hljs-value{color:#a31515}.ruby .hljs-symbol{color:#a31515}.ruby .hljs-symbol .hljs-string{color:#a31515}.hljs-template_tag,.django .hljs-variable,.hljs-addition,.hljs-flow,.hljs-stream,.apache .hljs-tag,.hljs-date,.tex .hljs-formula,.coffeescript .hljs-attribute{color:#a31515}.ruby .hljs-string,.hljs-decorator,.hljs-filter .hljs-argument,.hljs-localvars,.hljs-array,.hljs-attr_selector,.hljs-pseudo,.hljs-pi,.hljs-doctype,.hljs-deletion,.hljs-envvar,.hljs-shebang,.hljs-preprocessor,.hljs-pragma,.userType,.apache .hljs-sqbracket,.nginx .hljs-built_in,.tex .hljs-special,.hljs-prompt{color:#2b91af}.hljs-phpdoc,.hljs-javadoc,.hljs-xmlDocTag{color:gray}.vhdl .hljs-typename{font-weight:bold}.vhdl .hljs-string{color:#666}.vhdl .hljs-literal{color:#a31515}.vhdl .hljs-attribute{color:#00b0e8}.xml .hljs-attribute{color:red}ul.tsd-descriptions>li>:first-child,.tsd-panel>:first-child,.col>:first-child,.col-11>:first-child,.col-10>:first-child,.col-9>:first-child,.col-8>:first-child,.col-7>:first-child,.col-6>:first-child,.col-5>:first-child,.col-4>:first-child,.col-3>:first-child,.col-2>:first-child,.col-1>:first-child,ul.tsd-descriptions>li>:first-child>:first-child,.tsd-panel>:first-child>:first-child,.col>:first-child>:first-child,.col-11>:first-child>:first-child,.col-10>:first-child>:first-child,.col-9>:first-child>:first-child,.col-8>:first-child>:first-child,.col-7>:first-child>:first-child,.col-6>:first-child>:first-child,.col-5>:first-child>:first-child,.col-4>:first-child>:first-child,.col-3>:first-child>:first-child,.col-2>:first-child>:first-child,.col-1>:first-child>:first-child,ul.tsd-descriptions>li>:first-child>:first-child>:first-child,.tsd-panel>:first-child>:first-child>:first-child,.col>:first-child>:first-child>:first-child,.col-11>:first-child>:first-child>:first-child,.col-10>:first-child>:first-child>:first-child,.col-9>:first-child>:first-child>:first-child,.col-8>:first-child>:first-child>:first-child,.col-7>:first-child>:first-child>:first-child,.col-6>:first-child>:first-child>:first-child,.col-5>:first-child>:first-child>:first-child,.col-4>:first-child>:first-child>:first-child,.col-3>:first-child>:first-child>:first-child,.col-2>:first-child>:first-child>:first-child,.col-1>:first-child>:first-child>:first-child{margin-top:0}ul.tsd-descriptions>li>:last-child,.tsd-panel>:last-child,.col>:last-child,.col-11>:last-child,.col-10>:last-child,.col-9>:last-child,.col-8>:last-child,.col-7>:last-child,.col-6>:last-child,.col-5>:last-child,.col-4>:last-child,.col-3>:last-child,.col-2>:last-child,.col-1>:last-child,ul.tsd-descriptions>li>:last-child>:last-child,.tsd-panel>:last-child>:last-child,.col>:last-child>:last-child,.col-11>:last-child>:last-child,.col-10>:last-child>:last-child,.col-9>:last-child>:last-child,.col-8>:last-child>:last-child,.col-7>:last-child>:last-child,.col-6>:last-child>:last-child,.col-5>:last-child>:last-child,.col-4>:last-child>:last-child,.col-3>:last-child>:last-child,.col-2>:last-child>:last-child,.col-1>:last-child>:last-child,ul.tsd-descriptions>li>:last-child>:last-child>:last-child,.tsd-panel>:last-child>:last-child>:last-child,.col>:last-child>:last-child>:last-child,.col-11>:last-child>:last-child>:last-child,.col-10>:last-child>:last-child>:last-child,.col-9>:last-child>:last-child>:last-child,.col-8>:last-child>:last-child>:last-child,.col-7>:last-child>:last-child>:last-child,.col-6>:last-child>:last-child>:last-child,.col-5>:last-child>:last-child>:last-child,.col-4>:last-child>:last-child>:last-child,.col-3>:last-child>:last-child>:last-child,.col-2>:last-child>:last-child>:last-child,.col-1>:last-child>:last-child>:last-child{margin-bottom:0}.container{max-width:1200px;margin:0 auto;padding:0 40px}@media(max-width: 640px){.container{padding:0 20px}}.container-main{padding-bottom:200px}.row{display:flex;position:relative;margin:0 -10px}.row:after{visibility:hidden;display:block;content:"";clear:both;height:0}.col,.col-11,.col-10,.col-9,.col-8,.col-7,.col-6,.col-5,.col-4,.col-3,.col-2,.col-1{box-sizing:border-box;float:left;padding:0 10px}.col-1{width:8.3333333333%}.offset-1{margin-left:8.3333333333%}.col-2{width:16.6666666667%}.offset-2{margin-left:16.6666666667%}.col-3{width:25%}.offset-3{margin-left:25%}.col-4{width:33.3333333333%}.offset-4{margin-left:33.3333333333%}.col-5{width:41.6666666667%}.offset-5{margin-left:41.6666666667%}.col-6{width:50%}.offset-6{margin-left:50%}.col-7{width:58.3333333333%}.offset-7{margin-left:58.3333333333%}.col-8{width:66.6666666667%}.offset-8{margin-left:66.6666666667%}.col-9{width:75%}.offset-9{margin-left:75%}.col-10{width:83.3333333333%}.offset-10{margin-left:83.3333333333%}.col-11{width:91.6666666667%}.offset-11{margin-left:91.6666666667%}.tsd-kind-icon{display:block;position:relative;padding-left:20px;text-indent:-20px}.tsd-kind-icon:before{content:"";display:inline-block;vertical-align:middle;width:17px;height:17px;margin:0 3px 2px 0;background-image:url(../images/icons.png)}@media(-webkit-min-device-pixel-ratio: 1.5),(min-resolution: 144dpi){.tsd-kind-icon:before{background-image:url(../images/icons@2x.png);background-size:238px 204px}}.tsd-signature.tsd-kind-icon:before{background-position:0 -153px}.tsd-kind-object-literal>.tsd-kind-icon:before{background-position:0px -17px}.tsd-kind-object-literal.tsd-is-protected>.tsd-kind-icon:before{background-position:-17px -17px}.tsd-kind-object-literal.tsd-is-private>.tsd-kind-icon:before{background-position:-34px -17px}.tsd-kind-class>.tsd-kind-icon:before{background-position:0px -34px}.tsd-kind-class.tsd-is-protected>.tsd-kind-icon:before{background-position:-17px -34px}.tsd-kind-class.tsd-is-private>.tsd-kind-icon:before{background-position:-34px -34px}.tsd-kind-class.tsd-has-type-parameter>.tsd-kind-icon:before{background-position:0px -51px}.tsd-kind-class.tsd-has-type-parameter.tsd-is-protected>.tsd-kind-icon:before{background-position:-17px -51px}.tsd-kind-class.tsd-has-type-parameter.tsd-is-private>.tsd-kind-icon:before{background-position:-34px -51px}.tsd-kind-interface>.tsd-kind-icon:before{background-position:0px -68px}.tsd-kind-interface.tsd-is-protected>.tsd-kind-icon:before{background-position:-17px -68px}.tsd-kind-interface.tsd-is-private>.tsd-kind-icon:before{background-position:-34px -68px}.tsd-kind-interface.tsd-has-type-parameter>.tsd-kind-icon:before{background-position:0px -85px}.tsd-kind-interface.tsd-has-type-parameter.tsd-is-protected>.tsd-kind-icon:before{background-position:-17px -85px}.tsd-kind-interface.tsd-has-type-parameter.tsd-is-private>.tsd-kind-icon:before{background-position:-34px -85px}.tsd-kind-namespace>.tsd-kind-icon:before{background-position:0px -102px}.tsd-kind-namespace.tsd-is-protected>.tsd-kind-icon:before{background-position:-17px -102px}.tsd-kind-namespace.tsd-is-private>.tsd-kind-icon:before{background-position:-34px -102px}.tsd-kind-module>.tsd-kind-icon:before{background-position:0px -102px}.tsd-kind-module.tsd-is-protected>.tsd-kind-icon:before{background-position:-17px -102px}.tsd-kind-module.tsd-is-private>.tsd-kind-icon:before{background-position:-34px -102px}.tsd-kind-enum>.tsd-kind-icon:before{background-position:0px -119px}.tsd-kind-enum.tsd-is-protected>.tsd-kind-icon:before{background-position:-17px -119px}.tsd-kind-enum.tsd-is-private>.tsd-kind-icon:before{background-position:-34px -119px}.tsd-kind-enum-member>.tsd-kind-icon:before{background-position:0px -136px}.tsd-kind-enum-member.tsd-is-protected>.tsd-kind-icon:before{background-position:-17px -136px}.tsd-kind-enum-member.tsd-is-private>.tsd-kind-icon:before{background-position:-34px -136px}.tsd-kind-signature>.tsd-kind-icon:before{background-position:0px -153px}.tsd-kind-signature.tsd-is-protected>.tsd-kind-icon:before{background-position:-17px -153px}.tsd-kind-signature.tsd-is-private>.tsd-kind-icon:before{background-position:-34px -153px}.tsd-kind-type-alias>.tsd-kind-icon:before{background-position:0px -170px}.tsd-kind-type-alias.tsd-is-protected>.tsd-kind-icon:before{background-position:-17px -170px}.tsd-kind-type-alias.tsd-is-private>.tsd-kind-icon:before{background-position:-34px -170px}.tsd-kind-type-alias.tsd-has-type-parameter>.tsd-kind-icon:before{background-position:0px -187px}.tsd-kind-type-alias.tsd-has-type-parameter.tsd-is-protected>.tsd-kind-icon:before{background-position:-17px -187px}.tsd-kind-type-alias.tsd-has-type-parameter.tsd-is-private>.tsd-kind-icon:before{background-position:-34px -187px}.tsd-kind-variable>.tsd-kind-icon:before{background-position:-136px -0px}.tsd-kind-variable.tsd-is-protected>.tsd-kind-icon:before{background-position:-153px -0px}.tsd-kind-variable.tsd-is-private>.tsd-kind-icon:before{background-position:-119px -0px}.tsd-kind-variable.tsd-parent-kind-class>.tsd-kind-icon:before{background-position:-51px -0px}.tsd-kind-variable.tsd-parent-kind-class.tsd-is-inherited>.tsd-kind-icon:before{background-position:-68px -0px}.tsd-kind-variable.tsd-parent-kind-class.tsd-is-protected>.tsd-kind-icon:before{background-position:-85px -0px}.tsd-kind-variable.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited>.tsd-kind-icon:before{background-position:-102px -0px}.tsd-kind-variable.tsd-parent-kind-class.tsd-is-private>.tsd-kind-icon:before{background-position:-119px -0px}.tsd-kind-variable.tsd-parent-kind-enum>.tsd-kind-icon:before{background-position:-170px -0px}.tsd-kind-variable.tsd-parent-kind-enum.tsd-is-protected>.tsd-kind-icon:before{background-position:-187px -0px}.tsd-kind-variable.tsd-parent-kind-enum.tsd-is-private>.tsd-kind-icon:before{background-position:-119px -0px}.tsd-kind-variable.tsd-parent-kind-interface>.tsd-kind-icon:before{background-position:-204px -0px}.tsd-kind-variable.tsd-parent-kind-interface.tsd-is-inherited>.tsd-kind-icon:before{background-position:-221px -0px}.tsd-kind-property>.tsd-kind-icon:before{background-position:-136px -0px}.tsd-kind-property.tsd-is-protected>.tsd-kind-icon:before{background-position:-153px -0px}.tsd-kind-property.tsd-is-private>.tsd-kind-icon:before{background-position:-119px -0px}.tsd-kind-property.tsd-parent-kind-class>.tsd-kind-icon:before{background-position:-51px -0px}.tsd-kind-property.tsd-parent-kind-class.tsd-is-inherited>.tsd-kind-icon:before{background-position:-68px -0px}.tsd-kind-property.tsd-parent-kind-class.tsd-is-protected>.tsd-kind-icon:before{background-position:-85px -0px}.tsd-kind-property.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited>.tsd-kind-icon:before{background-position:-102px -0px}.tsd-kind-property.tsd-parent-kind-class.tsd-is-private>.tsd-kind-icon:before{background-position:-119px -0px}.tsd-kind-property.tsd-parent-kind-enum>.tsd-kind-icon:before{background-position:-170px -0px}.tsd-kind-property.tsd-parent-kind-enum.tsd-is-protected>.tsd-kind-icon:before{background-position:-187px -0px}.tsd-kind-property.tsd-parent-kind-enum.tsd-is-private>.tsd-kind-icon:before{background-position:-119px -0px}.tsd-kind-property.tsd-parent-kind-interface>.tsd-kind-icon:before{background-position:-204px -0px}.tsd-kind-property.tsd-parent-kind-interface.tsd-is-inherited>.tsd-kind-icon:before{background-position:-221px -0px}.tsd-kind-get-signature>.tsd-kind-icon:before{background-position:-136px -17px}.tsd-kind-get-signature.tsd-is-protected>.tsd-kind-icon:before{background-position:-153px -17px}.tsd-kind-get-signature.tsd-is-private>.tsd-kind-icon:before{background-position:-119px -17px}.tsd-kind-get-signature.tsd-parent-kind-class>.tsd-kind-icon:before{background-position:-51px -17px}.tsd-kind-get-signature.tsd-parent-kind-class.tsd-is-inherited>.tsd-kind-icon:before{background-position:-68px -17px}.tsd-kind-get-signature.tsd-parent-kind-class.tsd-is-protected>.tsd-kind-icon:before{background-position:-85px -17px}.tsd-kind-get-signature.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited>.tsd-kind-icon:before{background-position:-102px -17px}.tsd-kind-get-signature.tsd-parent-kind-class.tsd-is-private>.tsd-kind-icon:before{background-position:-119px -17px}.tsd-kind-get-signature.tsd-parent-kind-enum>.tsd-kind-icon:before{background-position:-170px -17px}.tsd-kind-get-signature.tsd-parent-kind-enum.tsd-is-protected>.tsd-kind-icon:before{background-position:-187px -17px}.tsd-kind-get-signature.tsd-parent-kind-enum.tsd-is-private>.tsd-kind-icon:before{background-position:-119px -17px}.tsd-kind-get-signature.tsd-parent-kind-interface>.tsd-kind-icon:before{background-position:-204px -17px}.tsd-kind-get-signature.tsd-parent-kind-interface.tsd-is-inherited>.tsd-kind-icon:before{background-position:-221px -17px}.tsd-kind-set-signature>.tsd-kind-icon:before{background-position:-136px -34px}.tsd-kind-set-signature.tsd-is-protected>.tsd-kind-icon:before{background-position:-153px -34px}.tsd-kind-set-signature.tsd-is-private>.tsd-kind-icon:before{background-position:-119px -34px}.tsd-kind-set-signature.tsd-parent-kind-class>.tsd-kind-icon:before{background-position:-51px -34px}.tsd-kind-set-signature.tsd-parent-kind-class.tsd-is-inherited>.tsd-kind-icon:before{background-position:-68px -34px}.tsd-kind-set-signature.tsd-parent-kind-class.tsd-is-protected>.tsd-kind-icon:before{background-position:-85px -34px}.tsd-kind-set-signature.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited>.tsd-kind-icon:before{background-position:-102px -34px}.tsd-kind-set-signature.tsd-parent-kind-class.tsd-is-private>.tsd-kind-icon:before{background-position:-119px -34px}.tsd-kind-set-signature.tsd-parent-kind-enum>.tsd-kind-icon:before{background-position:-170px -34px}.tsd-kind-set-signature.tsd-parent-kind-enum.tsd-is-protected>.tsd-kind-icon:before{background-position:-187px -34px}.tsd-kind-set-signature.tsd-parent-kind-enum.tsd-is-private>.tsd-kind-icon:before{background-position:-119px -34px}.tsd-kind-set-signature.tsd-parent-kind-interface>.tsd-kind-icon:before{background-position:-204px -34px}.tsd-kind-set-signature.tsd-parent-kind-interface.tsd-is-inherited>.tsd-kind-icon:before{background-position:-221px -34px}.tsd-kind-accessor>.tsd-kind-icon:before{background-position:-136px -51px}.tsd-kind-accessor.tsd-is-protected>.tsd-kind-icon:before{background-position:-153px -51px}.tsd-kind-accessor.tsd-is-private>.tsd-kind-icon:before{background-position:-119px -51px}.tsd-kind-accessor.tsd-parent-kind-class>.tsd-kind-icon:before{background-position:-51px -51px}.tsd-kind-accessor.tsd-parent-kind-class.tsd-is-inherited>.tsd-kind-icon:before{background-position:-68px -51px}.tsd-kind-accessor.tsd-parent-kind-class.tsd-is-protected>.tsd-kind-icon:before{background-position:-85px -51px}.tsd-kind-accessor.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited>.tsd-kind-icon:before{background-position:-102px -51px}.tsd-kind-accessor.tsd-parent-kind-class.tsd-is-private>.tsd-kind-icon:before{background-position:-119px -51px}.tsd-kind-accessor.tsd-parent-kind-enum>.tsd-kind-icon:before{background-position:-170px -51px}.tsd-kind-accessor.tsd-parent-kind-enum.tsd-is-protected>.tsd-kind-icon:before{background-position:-187px -51px}.tsd-kind-accessor.tsd-parent-kind-enum.tsd-is-private>.tsd-kind-icon:before{background-position:-119px -51px}.tsd-kind-accessor.tsd-parent-kind-interface>.tsd-kind-icon:before{background-position:-204px -51px}.tsd-kind-accessor.tsd-parent-kind-interface.tsd-is-inherited>.tsd-kind-icon:before{background-position:-221px -51px}.tsd-kind-function>.tsd-kind-icon:before{background-position:-136px -68px}.tsd-kind-function.tsd-is-protected>.tsd-kind-icon:before{background-position:-153px -68px}.tsd-kind-function.tsd-is-private>.tsd-kind-icon:before{background-position:-119px -68px}.tsd-kind-function.tsd-parent-kind-class>.tsd-kind-icon:before{background-position:-51px -68px}.tsd-kind-function.tsd-parent-kind-class.tsd-is-inherited>.tsd-kind-icon:before{background-position:-68px -68px}.tsd-kind-function.tsd-parent-kind-class.tsd-is-protected>.tsd-kind-icon:before{background-position:-85px -68px}.tsd-kind-function.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited>.tsd-kind-icon:before{background-position:-102px -68px}.tsd-kind-function.tsd-parent-kind-class.tsd-is-private>.tsd-kind-icon:before{background-position:-119px -68px}.tsd-kind-function.tsd-parent-kind-enum>.tsd-kind-icon:before{background-position:-170px -68px}.tsd-kind-function.tsd-parent-kind-enum.tsd-is-protected>.tsd-kind-icon:before{background-position:-187px -68px}.tsd-kind-function.tsd-parent-kind-enum.tsd-is-private>.tsd-kind-icon:before{background-position:-119px -68px}.tsd-kind-function.tsd-parent-kind-interface>.tsd-kind-icon:before{background-position:-204px -68px}.tsd-kind-function.tsd-parent-kind-interface.tsd-is-inherited>.tsd-kind-icon:before{background-position:-221px -68px}.tsd-kind-method>.tsd-kind-icon:before{background-position:-136px -68px}.tsd-kind-method.tsd-is-protected>.tsd-kind-icon:before{background-position:-153px -68px}.tsd-kind-method.tsd-is-private>.tsd-kind-icon:before{background-position:-119px -68px}.tsd-kind-method.tsd-parent-kind-class>.tsd-kind-icon:before{background-position:-51px -68px}.tsd-kind-method.tsd-parent-kind-class.tsd-is-inherited>.tsd-kind-icon:before{background-position:-68px -68px}.tsd-kind-method.tsd-parent-kind-class.tsd-is-protected>.tsd-kind-icon:before{background-position:-85px -68px}.tsd-kind-method.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited>.tsd-kind-icon:before{background-position:-102px -68px}.tsd-kind-method.tsd-parent-kind-class.tsd-is-private>.tsd-kind-icon:before{background-position:-119px -68px}.tsd-kind-method.tsd-parent-kind-enum>.tsd-kind-icon:before{background-position:-170px -68px}.tsd-kind-method.tsd-parent-kind-enum.tsd-is-protected>.tsd-kind-icon:before{background-position:-187px -68px}.tsd-kind-method.tsd-parent-kind-enum.tsd-is-private>.tsd-kind-icon:before{background-position:-119px -68px}.tsd-kind-method.tsd-parent-kind-interface>.tsd-kind-icon:before{background-position:-204px -68px}.tsd-kind-method.tsd-parent-kind-interface.tsd-is-inherited>.tsd-kind-icon:before{background-position:-221px -68px}.tsd-kind-call-signature>.tsd-kind-icon:before{background-position:-136px -68px}.tsd-kind-call-signature.tsd-is-protected>.tsd-kind-icon:before{background-position:-153px -68px}.tsd-kind-call-signature.tsd-is-private>.tsd-kind-icon:before{background-position:-119px -68px}.tsd-kind-call-signature.tsd-parent-kind-class>.tsd-kind-icon:before{background-position:-51px -68px}.tsd-kind-call-signature.tsd-parent-kind-class.tsd-is-inherited>.tsd-kind-icon:before{background-position:-68px -68px}.tsd-kind-call-signature.tsd-parent-kind-class.tsd-is-protected>.tsd-kind-icon:before{background-position:-85px -68px}.tsd-kind-call-signature.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited>.tsd-kind-icon:before{background-position:-102px -68px}.tsd-kind-call-signature.tsd-parent-kind-class.tsd-is-private>.tsd-kind-icon:before{background-position:-119px -68px}.tsd-kind-call-signature.tsd-parent-kind-enum>.tsd-kind-icon:before{background-position:-170px -68px}.tsd-kind-call-signature.tsd-parent-kind-enum.tsd-is-protected>.tsd-kind-icon:before{background-position:-187px -68px}.tsd-kind-call-signature.tsd-parent-kind-enum.tsd-is-private>.tsd-kind-icon:before{background-position:-119px -68px}.tsd-kind-call-signature.tsd-parent-kind-interface>.tsd-kind-icon:before{background-position:-204px -68px}.tsd-kind-call-signature.tsd-parent-kind-interface.tsd-is-inherited>.tsd-kind-icon:before{background-position:-221px -68px}.tsd-kind-function.tsd-has-type-parameter>.tsd-kind-icon:before{background-position:-136px -85px}.tsd-kind-function.tsd-has-type-parameter.tsd-is-protected>.tsd-kind-icon:before{background-position:-153px -85px}.tsd-kind-function.tsd-has-type-parameter.tsd-is-private>.tsd-kind-icon:before{background-position:-119px -85px}.tsd-kind-function.tsd-has-type-parameter.tsd-parent-kind-class>.tsd-kind-icon:before{background-position:-51px -85px}.tsd-kind-function.tsd-has-type-parameter.tsd-parent-kind-class.tsd-is-inherited>.tsd-kind-icon:before{background-position:-68px -85px}.tsd-kind-function.tsd-has-type-parameter.tsd-parent-kind-class.tsd-is-protected>.tsd-kind-icon:before{background-position:-85px -85px}.tsd-kind-function.tsd-has-type-parameter.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited>.tsd-kind-icon:before{background-position:-102px -85px}.tsd-kind-function.tsd-has-type-parameter.tsd-parent-kind-class.tsd-is-private>.tsd-kind-icon:before{background-position:-119px -85px}.tsd-kind-function.tsd-has-type-parameter.tsd-parent-kind-enum>.tsd-kind-icon:before{background-position:-170px -85px}.tsd-kind-function.tsd-has-type-parameter.tsd-parent-kind-enum.tsd-is-protected>.tsd-kind-icon:before{background-position:-187px -85px}.tsd-kind-function.tsd-has-type-parameter.tsd-parent-kind-enum.tsd-is-private>.tsd-kind-icon:before{background-position:-119px -85px}.tsd-kind-function.tsd-has-type-parameter.tsd-parent-kind-interface>.tsd-kind-icon:before{background-position:-204px -85px}.tsd-kind-function.tsd-has-type-parameter.tsd-parent-kind-interface.tsd-is-inherited>.tsd-kind-icon:before{background-position:-221px -85px}.tsd-kind-method.tsd-has-type-parameter>.tsd-kind-icon:before{background-position:-136px -85px}.tsd-kind-method.tsd-has-type-parameter.tsd-is-protected>.tsd-kind-icon:before{background-position:-153px -85px}.tsd-kind-method.tsd-has-type-parameter.tsd-is-private>.tsd-kind-icon:before{background-position:-119px -85px}.tsd-kind-method.tsd-has-type-parameter.tsd-parent-kind-class>.tsd-kind-icon:before{background-position:-51px -85px}.tsd-kind-method.tsd-has-type-parameter.tsd-parent-kind-class.tsd-is-inherited>.tsd-kind-icon:before{background-position:-68px -85px}.tsd-kind-method.tsd-has-type-parameter.tsd-parent-kind-class.tsd-is-protected>.tsd-kind-icon:before{background-position:-85px -85px}.tsd-kind-method.tsd-has-type-parameter.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited>.tsd-kind-icon:before{background-position:-102px -85px}.tsd-kind-method.tsd-has-type-parameter.tsd-parent-kind-class.tsd-is-private>.tsd-kind-icon:before{background-position:-119px -85px}.tsd-kind-method.tsd-has-type-parameter.tsd-parent-kind-enum>.tsd-kind-icon:before{background-position:-170px -85px}.tsd-kind-method.tsd-has-type-parameter.tsd-parent-kind-enum.tsd-is-protected>.tsd-kind-icon:before{background-position:-187px -85px}.tsd-kind-method.tsd-has-type-parameter.tsd-parent-kind-enum.tsd-is-private>.tsd-kind-icon:before{background-position:-119px -85px}.tsd-kind-method.tsd-has-type-parameter.tsd-parent-kind-interface>.tsd-kind-icon:before{background-position:-204px -85px}.tsd-kind-method.tsd-has-type-parameter.tsd-parent-kind-interface.tsd-is-inherited>.tsd-kind-icon:before{background-position:-221px -85px}.tsd-kind-constructor>.tsd-kind-icon:before{background-position:-136px -102px}.tsd-kind-constructor.tsd-is-protected>.tsd-kind-icon:before{background-position:-153px -102px}.tsd-kind-constructor.tsd-is-private>.tsd-kind-icon:before{background-position:-119px -102px}.tsd-kind-constructor.tsd-parent-kind-class>.tsd-kind-icon:before{background-position:-51px -102px}.tsd-kind-constructor.tsd-parent-kind-class.tsd-is-inherited>.tsd-kind-icon:before{background-position:-68px -102px}.tsd-kind-constructor.tsd-parent-kind-class.tsd-is-protected>.tsd-kind-icon:before{background-position:-85px -102px}.tsd-kind-constructor.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited>.tsd-kind-icon:before{background-position:-102px -102px}.tsd-kind-constructor.tsd-parent-kind-class.tsd-is-private>.tsd-kind-icon:before{background-position:-119px -102px}.tsd-kind-constructor.tsd-parent-kind-enum>.tsd-kind-icon:before{background-position:-170px -102px}.tsd-kind-constructor.tsd-parent-kind-enum.tsd-is-protected>.tsd-kind-icon:before{background-position:-187px -102px}.tsd-kind-constructor.tsd-parent-kind-enum.tsd-is-private>.tsd-kind-icon:before{background-position:-119px -102px}.tsd-kind-constructor.tsd-parent-kind-interface>.tsd-kind-icon:before{background-position:-204px -102px}.tsd-kind-constructor.tsd-parent-kind-interface.tsd-is-inherited>.tsd-kind-icon:before{background-position:-221px -102px}.tsd-kind-constructor-signature>.tsd-kind-icon:before{background-position:-136px -102px}.tsd-kind-constructor-signature.tsd-is-protected>.tsd-kind-icon:before{background-position:-153px -102px}.tsd-kind-constructor-signature.tsd-is-private>.tsd-kind-icon:before{background-position:-119px -102px}.tsd-kind-constructor-signature.tsd-parent-kind-class>.tsd-kind-icon:before{background-position:-51px -102px}.tsd-kind-constructor-signature.tsd-parent-kind-class.tsd-is-inherited>.tsd-kind-icon:before{background-position:-68px -102px}.tsd-kind-constructor-signature.tsd-parent-kind-class.tsd-is-protected>.tsd-kind-icon:before{background-position:-85px -102px}.tsd-kind-constructor-signature.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited>.tsd-kind-icon:before{background-position:-102px -102px}.tsd-kind-constructor-signature.tsd-parent-kind-class.tsd-is-private>.tsd-kind-icon:before{background-position:-119px -102px}.tsd-kind-constructor-signature.tsd-parent-kind-enum>.tsd-kind-icon:before{background-position:-170px -102px}.tsd-kind-constructor-signature.tsd-parent-kind-enum.tsd-is-protected>.tsd-kind-icon:before{background-position:-187px -102px}.tsd-kind-constructor-signature.tsd-parent-kind-enum.tsd-is-private>.tsd-kind-icon:before{background-position:-119px -102px}.tsd-kind-constructor-signature.tsd-parent-kind-interface>.tsd-kind-icon:before{background-position:-204px -102px}.tsd-kind-constructor-signature.tsd-parent-kind-interface.tsd-is-inherited>.tsd-kind-icon:before{background-position:-221px -102px}.tsd-kind-index-signature>.tsd-kind-icon:before{background-position:-136px -119px}.tsd-kind-index-signature.tsd-is-protected>.tsd-kind-icon:before{background-position:-153px -119px}.tsd-kind-index-signature.tsd-is-private>.tsd-kind-icon:before{background-position:-119px -119px}.tsd-kind-index-signature.tsd-parent-kind-class>.tsd-kind-icon:before{background-position:-51px -119px}.tsd-kind-index-signature.tsd-parent-kind-class.tsd-is-inherited>.tsd-kind-icon:before{background-position:-68px -119px}.tsd-kind-index-signature.tsd-parent-kind-class.tsd-is-protected>.tsd-kind-icon:before{background-position:-85px -119px}.tsd-kind-index-signature.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited>.tsd-kind-icon:before{background-position:-102px -119px}.tsd-kind-index-signature.tsd-parent-kind-class.tsd-is-private>.tsd-kind-icon:before{background-position:-119px -119px}.tsd-kind-index-signature.tsd-parent-kind-enum>.tsd-kind-icon:before{background-position:-170px -119px}.tsd-kind-index-signature.tsd-parent-kind-enum.tsd-is-protected>.tsd-kind-icon:before{background-position:-187px -119px}.tsd-kind-index-signature.tsd-parent-kind-enum.tsd-is-private>.tsd-kind-icon:before{background-position:-119px -119px}.tsd-kind-index-signature.tsd-parent-kind-interface>.tsd-kind-icon:before{background-position:-204px -119px}.tsd-kind-index-signature.tsd-parent-kind-interface.tsd-is-inherited>.tsd-kind-icon:before{background-position:-221px -119px}.tsd-kind-event>.tsd-kind-icon:before{background-position:-136px -136px}.tsd-kind-event.tsd-is-protected>.tsd-kind-icon:before{background-position:-153px -136px}.tsd-kind-event.tsd-is-private>.tsd-kind-icon:before{background-position:-119px -136px}.tsd-kind-event.tsd-parent-kind-class>.tsd-kind-icon:before{background-position:-51px -136px}.tsd-kind-event.tsd-parent-kind-class.tsd-is-inherited>.tsd-kind-icon:before{background-position:-68px -136px}.tsd-kind-event.tsd-parent-kind-class.tsd-is-protected>.tsd-kind-icon:before{background-position:-85px -136px}.tsd-kind-event.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited>.tsd-kind-icon:before{background-position:-102px -136px}.tsd-kind-event.tsd-parent-kind-class.tsd-is-private>.tsd-kind-icon:before{background-position:-119px -136px}.tsd-kind-event.tsd-parent-kind-enum>.tsd-kind-icon:before{background-position:-170px -136px}.tsd-kind-event.tsd-parent-kind-enum.tsd-is-protected>.tsd-kind-icon:before{background-position:-187px -136px}.tsd-kind-event.tsd-parent-kind-enum.tsd-is-private>.tsd-kind-icon:before{background-position:-119px -136px}.tsd-kind-event.tsd-parent-kind-interface>.tsd-kind-icon:before{background-position:-204px -136px}.tsd-kind-event.tsd-parent-kind-interface.tsd-is-inherited>.tsd-kind-icon:before{background-position:-221px -136px}.tsd-is-static>.tsd-kind-icon:before{background-position:-136px -153px}.tsd-is-static.tsd-is-protected>.tsd-kind-icon:before{background-position:-153px -153px}.tsd-is-static.tsd-is-private>.tsd-kind-icon:before{background-position:-119px -153px}.tsd-is-static.tsd-parent-kind-class>.tsd-kind-icon:before{background-position:-51px -153px}.tsd-is-static.tsd-parent-kind-class.tsd-is-inherited>.tsd-kind-icon:before{background-position:-68px -153px}.tsd-is-static.tsd-parent-kind-class.tsd-is-protected>.tsd-kind-icon:before{background-position:-85px -153px}.tsd-is-static.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited>.tsd-kind-icon:before{background-position:-102px -153px}.tsd-is-static.tsd-parent-kind-class.tsd-is-private>.tsd-kind-icon:before{background-position:-119px -153px}.tsd-is-static.tsd-parent-kind-enum>.tsd-kind-icon:before{background-position:-170px -153px}.tsd-is-static.tsd-parent-kind-enum.tsd-is-protected>.tsd-kind-icon:before{background-position:-187px -153px}.tsd-is-static.tsd-parent-kind-enum.tsd-is-private>.tsd-kind-icon:before{background-position:-119px -153px}.tsd-is-static.tsd-parent-kind-interface>.tsd-kind-icon:before{background-position:-204px -153px}.tsd-is-static.tsd-parent-kind-interface.tsd-is-inherited>.tsd-kind-icon:before{background-position:-221px -153px}.tsd-is-static.tsd-kind-function>.tsd-kind-icon:before{background-position:-136px -170px}.tsd-is-static.tsd-kind-function.tsd-is-protected>.tsd-kind-icon:before{background-position:-153px -170px}.tsd-is-static.tsd-kind-function.tsd-is-private>.tsd-kind-icon:before{background-position:-119px -170px}.tsd-is-static.tsd-kind-function.tsd-parent-kind-class>.tsd-kind-icon:before{background-position:-51px -170px}.tsd-is-static.tsd-kind-function.tsd-parent-kind-class.tsd-is-inherited>.tsd-kind-icon:before{background-position:-68px -170px}.tsd-is-static.tsd-kind-function.tsd-parent-kind-class.tsd-is-protected>.tsd-kind-icon:before{background-position:-85px -170px}.tsd-is-static.tsd-kind-function.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited>.tsd-kind-icon:before{background-position:-102px -170px}.tsd-is-static.tsd-kind-function.tsd-parent-kind-class.tsd-is-private>.tsd-kind-icon:before{background-position:-119px -170px}.tsd-is-static.tsd-kind-function.tsd-parent-kind-enum>.tsd-kind-icon:before{background-position:-170px -170px}.tsd-is-static.tsd-kind-function.tsd-parent-kind-enum.tsd-is-protected>.tsd-kind-icon:before{background-position:-187px -170px}.tsd-is-static.tsd-kind-function.tsd-parent-kind-enum.tsd-is-private>.tsd-kind-icon:before{background-position:-119px -170px}.tsd-is-static.tsd-kind-function.tsd-parent-kind-interface>.tsd-kind-icon:before{background-position:-204px -170px}.tsd-is-static.tsd-kind-function.tsd-parent-kind-interface.tsd-is-inherited>.tsd-kind-icon:before{background-position:-221px -170px}.tsd-is-static.tsd-kind-method>.tsd-kind-icon:before{background-position:-136px -170px}.tsd-is-static.tsd-kind-method.tsd-is-protected>.tsd-kind-icon:before{background-position:-153px -170px}.tsd-is-static.tsd-kind-method.tsd-is-private>.tsd-kind-icon:before{background-position:-119px -170px}.tsd-is-static.tsd-kind-method.tsd-parent-kind-class>.tsd-kind-icon:before{background-position:-51px -170px}.tsd-is-static.tsd-kind-method.tsd-parent-kind-class.tsd-is-inherited>.tsd-kind-icon:before{background-position:-68px -170px}.tsd-is-static.tsd-kind-method.tsd-parent-kind-class.tsd-is-protected>.tsd-kind-icon:before{background-position:-85px -170px}.tsd-is-static.tsd-kind-method.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited>.tsd-kind-icon:before{background-position:-102px -170px}.tsd-is-static.tsd-kind-method.tsd-parent-kind-class.tsd-is-private>.tsd-kind-icon:before{background-position:-119px -170px}.tsd-is-static.tsd-kind-method.tsd-parent-kind-enum>.tsd-kind-icon:before{background-position:-170px -170px}.tsd-is-static.tsd-kind-method.tsd-parent-kind-enum.tsd-is-protected>.tsd-kind-icon:before{background-position:-187px -170px}.tsd-is-static.tsd-kind-method.tsd-parent-kind-enum.tsd-is-private>.tsd-kind-icon:before{background-position:-119px -170px}.tsd-is-static.tsd-kind-method.tsd-parent-kind-interface>.tsd-kind-icon:before{background-position:-204px -170px}.tsd-is-static.tsd-kind-method.tsd-parent-kind-interface.tsd-is-inherited>.tsd-kind-icon:before{background-position:-221px -170px}.tsd-is-static.tsd-kind-call-signature>.tsd-kind-icon:before{background-position:-136px -170px}.tsd-is-static.tsd-kind-call-signature.tsd-is-protected>.tsd-kind-icon:before{background-position:-153px -170px}.tsd-is-static.tsd-kind-call-signature.tsd-is-private>.tsd-kind-icon:before{background-position:-119px -170px}.tsd-is-static.tsd-kind-call-signature.tsd-parent-kind-class>.tsd-kind-icon:before{background-position:-51px -170px}.tsd-is-static.tsd-kind-call-signature.tsd-parent-kind-class.tsd-is-inherited>.tsd-kind-icon:before{background-position:-68px -170px}.tsd-is-static.tsd-kind-call-signature.tsd-parent-kind-class.tsd-is-protected>.tsd-kind-icon:before{background-position:-85px -170px}.tsd-is-static.tsd-kind-call-signature.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited>.tsd-kind-icon:before{background-position:-102px -170px}.tsd-is-static.tsd-kind-call-signature.tsd-parent-kind-class.tsd-is-private>.tsd-kind-icon:before{background-position:-119px -170px}.tsd-is-static.tsd-kind-call-signature.tsd-parent-kind-enum>.tsd-kind-icon:before{background-position:-170px -170px}.tsd-is-static.tsd-kind-call-signature.tsd-parent-kind-enum.tsd-is-protected>.tsd-kind-icon:before{background-position:-187px -170px}.tsd-is-static.tsd-kind-call-signature.tsd-parent-kind-enum.tsd-is-private>.tsd-kind-icon:before{background-position:-119px -170px}.tsd-is-static.tsd-kind-call-signature.tsd-parent-kind-interface>.tsd-kind-icon:before{background-position:-204px -170px}.tsd-is-static.tsd-kind-call-signature.tsd-parent-kind-interface.tsd-is-inherited>.tsd-kind-icon:before{background-position:-221px -170px}.tsd-is-static.tsd-kind-event>.tsd-kind-icon:before{background-position:-136px -187px}.tsd-is-static.tsd-kind-event.tsd-is-protected>.tsd-kind-icon:before{background-position:-153px -187px}.tsd-is-static.tsd-kind-event.tsd-is-private>.tsd-kind-icon:before{background-position:-119px -187px}.tsd-is-static.tsd-kind-event.tsd-parent-kind-class>.tsd-kind-icon:before{background-position:-51px -187px}.tsd-is-static.tsd-kind-event.tsd-parent-kind-class.tsd-is-inherited>.tsd-kind-icon:before{background-position:-68px -187px}.tsd-is-static.tsd-kind-event.tsd-parent-kind-class.tsd-is-protected>.tsd-kind-icon:before{background-position:-85px -187px}.tsd-is-static.tsd-kind-event.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited>.tsd-kind-icon:before{background-position:-102px -187px}.tsd-is-static.tsd-kind-event.tsd-parent-kind-class.tsd-is-private>.tsd-kind-icon:before{background-position:-119px -187px}.tsd-is-static.tsd-kind-event.tsd-parent-kind-enum>.tsd-kind-icon:before{background-position:-170px -187px}.tsd-is-static.tsd-kind-event.tsd-parent-kind-enum.tsd-is-protected>.tsd-kind-icon:before{background-position:-187px -187px}.tsd-is-static.tsd-kind-event.tsd-parent-kind-enum.tsd-is-private>.tsd-kind-icon:before{background-position:-119px -187px}.tsd-is-static.tsd-kind-event.tsd-parent-kind-interface>.tsd-kind-icon:before{background-position:-204px -187px}.tsd-is-static.tsd-kind-event.tsd-parent-kind-interface.tsd-is-inherited>.tsd-kind-icon:before{background-position:-221px -187px}@keyframes fade-in{from{opacity:0}to{opacity:1}}@keyframes fade-out{from{opacity:1;visibility:visible}to{opacity:0}}@keyframes fade-in-delayed{0%{opacity:0}33%{opacity:0}100%{opacity:1}}@keyframes fade-out-delayed{0%{opacity:1;visibility:visible}66%{opacity:0}100%{opacity:0}}@keyframes shift-to-left{from{transform:translate(0, 0)}to{transform:translate(-25%, 0)}}@keyframes unshift-to-left{from{transform:translate(-25%, 0)}to{transform:translate(0, 0)}}@keyframes pop-in-from-right{from{transform:translate(100%, 0)}to{transform:translate(0, 0)}}@keyframes pop-out-to-right{from{transform:translate(0, 0);visibility:visible}to{transform:translate(100%, 0)}}body{background:#fdfdfd;font-family:"Segoe UI",sans-serif;font-size:16px;color:#222}a{color:#4da6ff;text-decoration:none}a:hover{text-decoration:underline}code,pre{font-family:Menlo,Monaco,Consolas,"Courier New",monospace;padding:.2em;margin:0;font-size:14px;background-color:rgba(0,0,0,.04)}pre{padding:10px}pre code{padding:0;font-size:100%;background-color:transparent}.tsd-typography{line-height:1.333em}.tsd-typography ul{list-style:square;padding:0 0 0 20px;margin:0}.tsd-typography h4,.tsd-typography .tsd-index-panel h3,.tsd-index-panel .tsd-typography h3,.tsd-typography h5,.tsd-typography h6{font-size:1em;margin:0}.tsd-typography h5,.tsd-typography h6{font-weight:normal}.tsd-typography p,.tsd-typography ul,.tsd-typography ol{margin:1em 0}@media(min-width: 901px)and (max-width: 1024px){html.default .col-content{width:72%}html.default .col-menu{width:28%}html.default .tsd-navigation{padding-left:10px}}@media(max-width: 900px){html.default .col-content{float:none;width:100%}html.default .col-menu{position:fixed !important;overflow:auto;-webkit-overflow-scrolling:touch;z-index:1024;top:0 !important;bottom:0 !important;left:auto !important;right:0 !important;width:100%;padding:20px 20px 0 0;max-width:450px;visibility:hidden;background-color:#fff;transform:translate(100%, 0)}html.default .col-menu>*:last-child{padding-bottom:20px}html.default .overlay{content:"";display:block;position:fixed;z-index:1023;top:0;left:0;right:0;bottom:0;background-color:rgba(0,0,0,.75);visibility:hidden}html.default.to-has-menu .overlay{animation:fade-in .4s}html.default.to-has-menu header,html.default.to-has-menu footer,html.default.to-has-menu .col-content{animation:shift-to-left .4s}html.default.to-has-menu .col-menu{animation:pop-in-from-right .4s}html.default.from-has-menu .overlay{animation:fade-out .4s}html.default.from-has-menu header,html.default.from-has-menu footer,html.default.from-has-menu .col-content{animation:unshift-to-left .4s}html.default.from-has-menu .col-menu{animation:pop-out-to-right .4s}html.default.has-menu body{overflow:hidden}html.default.has-menu .overlay{visibility:visible}html.default.has-menu header,html.default.has-menu footer,html.default.has-menu .col-content{transform:translate(-25%, 0)}html.default.has-menu .col-menu{visibility:visible;transform:translate(0, 0)}}.tsd-page-title{padding:70px 0 20px 0;margin:0 0 40px 0;background:#fff;box-shadow:0 0 5px rgba(0,0,0,.35)}.tsd-page-title h1{margin:0}.tsd-breadcrumb{margin:0;padding:0;color:#707070}.tsd-breadcrumb a{color:#707070;text-decoration:none}.tsd-breadcrumb a:hover{text-decoration:underline}.tsd-breadcrumb li{display:inline}.tsd-breadcrumb li:after{content:" / "}html.minimal .container{margin:0}html.minimal .container-main{padding-top:50px;padding-bottom:0}html.minimal .content-wrap{padding-left:300px}html.minimal .tsd-navigation{position:fixed !important;overflow:auto;-webkit-overflow-scrolling:touch;box-sizing:border-box;z-index:1;left:0;top:40px;bottom:0;width:300px;padding:20px;margin:0}html.minimal .tsd-member .tsd-member{margin-left:0}html.minimal .tsd-page-toolbar{position:fixed;z-index:2}html.minimal #tsd-filter .tsd-filter-group{right:0;transform:none}html.minimal footer{background-color:transparent}html.minimal footer .container{padding:0}html.minimal .tsd-generator{padding:0}@media(max-width: 900px){html.minimal .tsd-navigation{display:none}html.minimal .content-wrap{padding-left:0}}dl.tsd-comment-tags{overflow:hidden}dl.tsd-comment-tags dt{float:left;padding:1px 5px;margin:0 10px 0 0;border-radius:4px;border:1px solid #707070;color:#707070;font-size:.8em;font-weight:normal}dl.tsd-comment-tags dd{margin:0 0 10px 0}dl.tsd-comment-tags dd:before,dl.tsd-comment-tags dd:after{display:table;content:" "}dl.tsd-comment-tags dd pre,dl.tsd-comment-tags dd:after{clear:both}dl.tsd-comment-tags p{margin:0}.tsd-panel.tsd-comment .lead{font-size:1.1em;line-height:1.333em;margin-bottom:2em}.tsd-panel.tsd-comment .lead:last-child{margin-bottom:0}.toggle-protected .tsd-is-private{display:none}.toggle-public .tsd-is-private,.toggle-public .tsd-is-protected,.toggle-public .tsd-is-private-protected{display:none}.toggle-inherited .tsd-is-inherited{display:none}.toggle-only-exported .tsd-is-not-exported{display:none}.toggle-externals .tsd-is-external{display:none}#tsd-filter{position:relative;display:inline-block;height:40px;vertical-align:bottom}.no-filter #tsd-filter{display:none}#tsd-filter .tsd-filter-group{display:inline-block;height:40px;vertical-align:bottom;white-space:nowrap}#tsd-filter input{display:none}@media(max-width: 900px){#tsd-filter .tsd-filter-group{display:block;position:absolute;top:40px;right:20px;height:auto;background-color:#fff;visibility:hidden;transform:translate(50%, 0);box-shadow:0 0 4px rgba(0,0,0,.25)}.has-options #tsd-filter .tsd-filter-group{visibility:visible}.to-has-options #tsd-filter .tsd-filter-group{animation:fade-in .2s}.from-has-options #tsd-filter .tsd-filter-group{animation:fade-out .2s}#tsd-filter label,#tsd-filter .tsd-select{display:block;padding-right:20px}}footer{border-top:1px solid #eee;background-color:#fff}footer.with-border-bottom{border-bottom:1px solid #eee}footer .tsd-legend-group{font-size:0}footer .tsd-legend{display:inline-block;width:25%;padding:0;font-size:16px;list-style:none;line-height:1.333em;vertical-align:top}@media(max-width: 900px){footer .tsd-legend{width:50%}}.tsd-hierarchy{list-style:square;padding:0 0 0 20px;margin:0}.tsd-hierarchy .target{font-weight:bold}.tsd-index-panel .tsd-index-content{margin-bottom:-30px !important}.tsd-index-panel .tsd-index-section{margin-bottom:30px !important}.tsd-index-panel h3{margin:0 -20px 10px -20px;padding:0 20px 10px 20px;border-bottom:1px solid #eee}.tsd-index-panel ul.tsd-index-list{-webkit-column-count:3;-moz-column-count:3;-ms-column-count:3;-o-column-count:3;column-count:3;-webkit-column-gap:20px;-moz-column-gap:20px;-ms-column-gap:20px;-o-column-gap:20px;column-gap:20px;padding:0;list-style:none;line-height:1.333em}@media(max-width: 900px){.tsd-index-panel ul.tsd-index-list{-webkit-column-count:1;-moz-column-count:1;-ms-column-count:1;-o-column-count:1;column-count:1}}@media(min-width: 901px)and (max-width: 1024px){.tsd-index-panel ul.tsd-index-list{-webkit-column-count:2;-moz-column-count:2;-ms-column-count:2;-o-column-count:2;column-count:2}}.tsd-index-panel ul.tsd-index-list li{-webkit-page-break-inside:avoid;-moz-page-break-inside:avoid;-ms-page-break-inside:avoid;-o-page-break-inside:avoid;page-break-inside:avoid}.tsd-index-panel a,.tsd-index-panel .tsd-parent-kind-module a{color:#9600ff}.tsd-index-panel .tsd-parent-kind-interface a{color:#647f1b}.tsd-index-panel .tsd-parent-kind-enum a{color:#937210}.tsd-index-panel .tsd-parent-kind-class a{color:#0672de}.tsd-index-panel .tsd-kind-module a{color:#9600ff}.tsd-index-panel .tsd-kind-interface a{color:#647f1b}.tsd-index-panel .tsd-kind-enum a{color:#937210}.tsd-index-panel .tsd-kind-class a{color:#0672de}.tsd-index-panel .tsd-is-private a{color:#707070}.tsd-flag{display:inline-block;padding:1px 5px;border-radius:4px;color:#fff;background-color:#707070;text-indent:0;font-size:14px;font-weight:normal}.tsd-anchor{position:absolute;top:-100px}.tsd-member{position:relative}.tsd-member .tsd-anchor+h3{margin-top:0;margin-bottom:0;border-bottom:none}.tsd-navigation{margin:0 0 0 40px}.tsd-navigation a{display:block;padding-top:2px;padding-bottom:2px;border-left:2px solid transparent;color:#222;text-decoration:none;transition:border-left-color .1s}.tsd-navigation a:hover{text-decoration:underline}.tsd-navigation ul{margin:0;padding:0;list-style:none}.tsd-navigation li{padding:0}.tsd-navigation.primary{padding-bottom:40px}.tsd-navigation.primary a{display:block;padding-top:6px;padding-bottom:6px}.tsd-navigation.primary ul li a{padding-left:5px}.tsd-navigation.primary ul li li a{padding-left:25px}.tsd-navigation.primary ul li li li a{padding-left:45px}.tsd-navigation.primary ul li li li li a{padding-left:65px}.tsd-navigation.primary ul li li li li li a{padding-left:85px}.tsd-navigation.primary ul li li li li li li a{padding-left:105px}.tsd-navigation.primary>ul{border-bottom:1px solid #eee}.tsd-navigation.primary li{border-top:1px solid #eee}.tsd-navigation.primary li.current>a{font-weight:bold}.tsd-navigation.primary li.label span{display:block;padding:20px 0 6px 5px;color:#707070}.tsd-navigation.primary li.globals+li>span,.tsd-navigation.primary li.globals+li>a{padding-top:20px}.tsd-navigation.secondary{max-height:calc(100vh - 1rem - 40px);overflow:auto;position:-webkit-sticky;position:sticky;top:calc(.5rem + 40px);transition:.3s}.tsd-navigation.secondary.tsd-navigation--toolbar-hide{max-height:calc(100vh - 1rem);top:.5rem}.tsd-navigation.secondary ul{transition:opacity .2s}.tsd-navigation.secondary ul li a{padding-left:25px}.tsd-navigation.secondary ul li li a{padding-left:45px}.tsd-navigation.secondary ul li li li a{padding-left:65px}.tsd-navigation.secondary ul li li li li a{padding-left:85px}.tsd-navigation.secondary ul li li li li li a{padding-left:105px}.tsd-navigation.secondary ul li li li li li li a{padding-left:125px}.tsd-navigation.secondary ul.current a{border-left-color:#eee}.tsd-navigation.secondary li.focus>a,.tsd-navigation.secondary ul.current li.focus>a{border-left-color:#000}.tsd-navigation.secondary li.current{margin-top:20px;margin-bottom:20px;border-left-color:#eee}.tsd-navigation.secondary li.current>a{font-weight:bold}@media(min-width: 901px){.menu-sticky-wrap{position:static}}.tsd-panel{margin:20px 0;padding:20px;background-color:#fff;box-shadow:0 0 4px rgba(0,0,0,.25)}.tsd-panel:empty{display:none}.tsd-panel>h1,.tsd-panel>h2,.tsd-panel>h3{margin:1.5em -20px 10px -20px;padding:0 20px 10px 20px;border-bottom:1px solid #eee}.tsd-panel>h1.tsd-before-signature,.tsd-panel>h2.tsd-before-signature,.tsd-panel>h3.tsd-before-signature{margin-bottom:0;border-bottom:0}.tsd-panel table{display:block;width:100%;overflow:auto;margin-top:10px;word-break:normal;word-break:keep-all}.tsd-panel table th{font-weight:bold}.tsd-panel table th,.tsd-panel table td{padding:6px 13px;border:1px solid #ddd}.tsd-panel table tr{background-color:#fff;border-top:1px solid #ccc}.tsd-panel table tr:nth-child(2n){background-color:#f8f8f8}.tsd-panel-group{margin:60px 0}.tsd-panel-group>h1,.tsd-panel-group>h2,.tsd-panel-group>h3{padding-left:20px;padding-right:20px}#tsd-search{transition:background-color .2s}#tsd-search .title{position:relative;z-index:2}#tsd-search .field{position:absolute;left:0;top:0;right:40px;height:40px}#tsd-search .field input{box-sizing:border-box;position:relative;top:-50px;z-index:1;width:100%;padding:0 10px;opacity:0;outline:0;border:0;background:transparent;color:#222}#tsd-search .field label{position:absolute;overflow:hidden;right:-40px}#tsd-search .field input,#tsd-search .title{transition:opacity .2s}#tsd-search .results{position:absolute;visibility:hidden;top:40px;width:100%;margin:0;padding:0;list-style:none;box-shadow:0 0 4px rgba(0,0,0,.25)}#tsd-search .results li{padding:0 10px;background-color:#fdfdfd}#tsd-search .results li:nth-child(even){background-color:#fff}#tsd-search .results li.state{display:none}#tsd-search .results li.current,#tsd-search .results li:hover{background-color:#eee}#tsd-search .results a{display:block}#tsd-search .results a:before{top:10px}#tsd-search .results span.parent{color:#707070;font-weight:normal}#tsd-search.has-focus{background-color:#eee}#tsd-search.has-focus .field input{top:0;opacity:1}#tsd-search.has-focus .title{z-index:0;opacity:0}#tsd-search.has-focus .results{visibility:visible}#tsd-search.loading .results li.state.loading{display:block}#tsd-search.failure .results li.state.failure{display:block}.tsd-signature{margin:0 0 1em 0;padding:10px;border:1px solid #eee;font-family:Menlo,Monaco,Consolas,"Courier New",monospace;font-size:14px;overflow-x:auto}.tsd-signature.tsd-kind-icon{padding-left:30px}.tsd-signature.tsd-kind-icon:before{top:10px;left:10px}.tsd-panel>.tsd-signature{margin-left:-20px;margin-right:-20px;border-width:1px 0}.tsd-panel>.tsd-signature.tsd-kind-icon{padding-left:40px}.tsd-panel>.tsd-signature.tsd-kind-icon:before{left:20px}.tsd-signature-symbol{color:#707070;font-weight:normal}.tsd-signature-type{font-style:italic;font-weight:normal}.tsd-signatures{padding:0;margin:0 0 1em 0;border:1px solid #eee}.tsd-signatures .tsd-signature{margin:0;border-width:1px 0 0 0;transition:background-color .1s}.tsd-signatures .tsd-signature:first-child{border-top-width:0}.tsd-signatures .tsd-signature.current{background-color:#eee}.tsd-signatures.active>.tsd-signature{cursor:pointer}.tsd-panel>.tsd-signatures{margin-left:-20px;margin-right:-20px;border-width:1px 0}.tsd-panel>.tsd-signatures .tsd-signature.tsd-kind-icon{padding-left:40px}.tsd-panel>.tsd-signatures .tsd-signature.tsd-kind-icon:before{left:20px}.tsd-panel>a.anchor+.tsd-signatures{border-top-width:0;margin-top:-20px}ul.tsd-descriptions{position:relative;overflow:hidden;padding:0;list-style:none}ul.tsd-descriptions.active>.tsd-description{display:none}ul.tsd-descriptions.active>.tsd-description.current{display:block}ul.tsd-descriptions.active>.tsd-description.fade-in{animation:fade-in-delayed .3s}ul.tsd-descriptions.active>.tsd-description.fade-out{animation:fade-out-delayed .3s;position:absolute;display:block;top:0;left:0;right:0;opacity:0;visibility:hidden}ul.tsd-descriptions h4,ul.tsd-descriptions .tsd-index-panel h3,.tsd-index-panel ul.tsd-descriptions h3{font-size:16px;margin:1em 0 .5em 0}ul.tsd-parameters,ul.tsd-type-parameters{list-style:square;margin:0;padding-left:20px}ul.tsd-parameters>li.tsd-parameter-signature,ul.tsd-type-parameters>li.tsd-parameter-signature{list-style:none;margin-left:-20px}ul.tsd-parameters h5,ul.tsd-type-parameters h5{font-size:16px;margin:1em 0 .5em 0}ul.tsd-parameters .tsd-comment,ul.tsd-type-parameters .tsd-comment{margin-top:-0.5em}.tsd-sources{font-size:14px;color:#707070;margin:0 0 1em 0}.tsd-sources a{color:#707070;text-decoration:underline}.tsd-sources ul,.tsd-sources p{margin:0 !important}.tsd-sources ul{list-style:none;padding:0}.tsd-page-toolbar{position:fixed;z-index:1;top:0;left:0;width:100%;height:40px;color:#333;background:#fff;border-bottom:1px solid #eee;transition:transform .3s linear}.tsd-page-toolbar a{color:#333;text-decoration:none}.tsd-page-toolbar a.title{font-weight:bold}.tsd-page-toolbar a.title:hover{text-decoration:underline}.tsd-page-toolbar .table-wrap{display:table;width:100%;height:40px}.tsd-page-toolbar .table-cell{display:table-cell;position:relative;white-space:nowrap;line-height:40px}.tsd-page-toolbar .table-cell:first-child{width:100%}.tsd-page-toolbar--hide{transform:translateY(-100%)}.tsd-select .tsd-select-list li:before,.tsd-select .tsd-select-label:before,.tsd-widget:before{content:"";display:inline-block;width:40px;height:40px;margin:0 -8px 0 0;background-image:url(../images/widgets.png);background-repeat:no-repeat;text-indent:-1024px;vertical-align:bottom}@media(-webkit-min-device-pixel-ratio: 1.5),(min-resolution: 144dpi){.tsd-select .tsd-select-list li:before,.tsd-select .tsd-select-label:before,.tsd-widget:before{background-image:url(../images/widgets@2x.png);background-size:320px 40px}}.tsd-widget{display:inline-block;overflow:hidden;opacity:.6;height:40px;transition:opacity .1s,background-color .2s;vertical-align:bottom;cursor:pointer}.tsd-widget:hover{opacity:.8}.tsd-widget.active{opacity:1;background-color:#eee}.tsd-widget.no-caption{width:40px}.tsd-widget.no-caption:before{margin:0}.tsd-widget.search:before{background-position:0 0}.tsd-widget.menu:before{background-position:-40px 0}.tsd-widget.options:before{background-position:-80px 0}.tsd-widget.options,.tsd-widget.menu{display:none}@media(max-width: 900px){.tsd-widget.options,.tsd-widget.menu{display:inline-block}}input[type=checkbox]+.tsd-widget:before{background-position:-120px 0}input[type=checkbox]:checked+.tsd-widget:before{background-position:-160px 0}.tsd-select{position:relative;display:inline-block;height:40px;transition:opacity .1s,background-color .2s;vertical-align:bottom;cursor:pointer}.tsd-select .tsd-select-label{opacity:.6;transition:opacity .2s}.tsd-select .tsd-select-label:before{background-position:-240px 0}.tsd-select.active .tsd-select-label{opacity:.8}.tsd-select.active .tsd-select-list{visibility:visible;opacity:1;transition-delay:0s}.tsd-select .tsd-select-list{position:absolute;visibility:hidden;top:40px;left:0;margin:0;padding:0;opacity:0;list-style:none;box-shadow:0 0 4px rgba(0,0,0,.25);transition:visibility 0s .2s,opacity .2s}.tsd-select .tsd-select-list li{padding:0 20px 0 0;background-color:#fdfdfd}.tsd-select .tsd-select-list li:before{background-position:40px 0}.tsd-select .tsd-select-list li:nth-child(even){background-color:#fff}.tsd-select .tsd-select-list li:hover{background-color:#eee}.tsd-select .tsd-select-list li.selected:before{background-position:-200px 0}@media(max-width: 900px){.tsd-select .tsd-select-list{top:0;left:auto;right:100%;margin-right:-5px}.tsd-select .tsd-select-label:before{background-position:-280px 0}}img{max-width:100%} diff --git a/docs/assets/images/icons.png b/docs/assets/images/icons.png deleted file mode 100644 index 3836d5f..0000000 Binary files a/docs/assets/images/icons.png and /dev/null differ diff --git a/docs/assets/images/icons@2x.png b/docs/assets/images/icons@2x.png deleted file mode 100644 index 5a209e2..0000000 Binary files a/docs/assets/images/icons@2x.png and /dev/null differ diff --git a/docs/assets/images/widgets.png b/docs/assets/images/widgets.png deleted file mode 100644 index c738053..0000000 Binary files a/docs/assets/images/widgets.png and /dev/null differ diff --git a/docs/assets/images/widgets@2x.png b/docs/assets/images/widgets@2x.png deleted file mode 100644 index 4bbbd57..0000000 Binary files a/docs/assets/images/widgets@2x.png and /dev/null differ diff --git a/docs/assets/js/main.js b/docs/assets/js/main.js deleted file mode 100644 index c2190a9..0000000 --- a/docs/assets/js/main.js +++ /dev/null @@ -1,51 +0,0 @@ -!function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=2)}([function(e,t,r){var n,i; -/** - * lunr - http://lunrjs.com - A bit like Solr, but much smaller and not as bright - 2.3.9 - * Copyright (C) 2020 Oliver Nightingale - * @license MIT - */!function(){var s,o,a,u,l,c,h,d,f,p,y,m,v,g,x,w,L,E,b,S,k,Q,O,P,T,_,C=function(e){var t=new C.Builder;return t.pipeline.add(C.trimmer,C.stopWordFilter,C.stemmer),t.searchPipeline.add(C.stemmer),e.call(t,t),t.build()};C.version="2.3.9" -/*! - * lunr.utils - * Copyright (C) 2020 Oliver Nightingale - */,C.utils={},C.utils.warn=(s=this,function(e){s.console&&console.warn&&console.warn(e)}),C.utils.asString=function(e){return null==e?"":e.toString()},C.utils.clone=function(e){if(null==e)return e;for(var t=Object.create(null),r=Object.keys(e),n=0;n0){var u=C.utils.clone(t)||{};u.position=[o,a],u.index=i.length,i.push(new C.Token(r.slice(o,s),u))}o=s+1}}return i},C.tokenizer.separator=/[\s\-]+/ -/*! - * lunr.Pipeline - * Copyright (C) 2020 Oliver Nightingale - */,C.Pipeline=function(){this._stack=[]},C.Pipeline.registeredFunctions=Object.create(null),C.Pipeline.registerFunction=function(e,t){t in this.registeredFunctions&&C.utils.warn("Overwriting existing registered function: "+t),e.label=t,C.Pipeline.registeredFunctions[e.label]=e},C.Pipeline.warnIfFunctionNotRegistered=function(e){e.label&&e.label in this.registeredFunctions||C.utils.warn("Function is not registered with pipeline. This may cause problems when serialising the index.\n",e)},C.Pipeline.load=function(e){var t=new C.Pipeline;return e.forEach((function(e){var r=C.Pipeline.registeredFunctions[e];if(!r)throw new Error("Cannot load unregistered function: "+e);t.add(r)})),t},C.Pipeline.prototype.add=function(){var e=Array.prototype.slice.call(arguments);e.forEach((function(e){C.Pipeline.warnIfFunctionNotRegistered(e),this._stack.push(e)}),this)},C.Pipeline.prototype.after=function(e,t){C.Pipeline.warnIfFunctionNotRegistered(t);var r=this._stack.indexOf(e);if(-1==r)throw new Error("Cannot find existingFn");r+=1,this._stack.splice(r,0,t)},C.Pipeline.prototype.before=function(e,t){C.Pipeline.warnIfFunctionNotRegistered(t);var r=this._stack.indexOf(e);if(-1==r)throw new Error("Cannot find existingFn");this._stack.splice(r,0,t)},C.Pipeline.prototype.remove=function(e){var t=this._stack.indexOf(e);-1!=t&&this._stack.splice(t,1)},C.Pipeline.prototype.run=function(e){for(var t=this._stack.length,r=0;r1&&(se&&(r=i),s!=e);)n=r-t,i=t+Math.floor(n/2),s=this.elements[2*i];return s==e||s>e?2*i:sa?l+=2:o==a&&(t+=r[u+1]*n[l+1],u+=2,l+=2);return t},C.Vector.prototype.similarity=function(e){return this.dot(e)/this.magnitude()||0},C.Vector.prototype.toArray=function(){for(var e=new Array(this.elements.length/2),t=1,r=0;t0){var s,o=i.str.charAt(0);o in i.node.edges?s=i.node.edges[o]:(s=new C.TokenSet,i.node.edges[o]=s),1==i.str.length&&(s.final=!0),n.push({node:s,editsRemaining:i.editsRemaining,str:i.str.slice(1)})}if(0!=i.editsRemaining){if("*"in i.node.edges)var a=i.node.edges["*"];else{a=new C.TokenSet;i.node.edges["*"]=a}if(0==i.str.length&&(a.final=!0),n.push({node:a,editsRemaining:i.editsRemaining-1,str:i.str}),i.str.length>1&&n.push({node:i.node,editsRemaining:i.editsRemaining-1,str:i.str.slice(1)}),1==i.str.length&&(i.node.final=!0),i.str.length>=1){if("*"in i.node.edges)var u=i.node.edges["*"];else{u=new C.TokenSet;i.node.edges["*"]=u}1==i.str.length&&(u.final=!0),n.push({node:u,editsRemaining:i.editsRemaining-1,str:i.str.slice(1)})}if(i.str.length>1){var l,c=i.str.charAt(0),h=i.str.charAt(1);h in i.node.edges?l=i.node.edges[h]:(l=new C.TokenSet,i.node.edges[h]=l),1==i.str.length&&(l.final=!0),n.push({node:l,editsRemaining:i.editsRemaining-1,str:c+i.str.slice(2)})}}}return r},C.TokenSet.fromString=function(e){for(var t=new C.TokenSet,r=t,n=0,i=e.length;n=e;t--){var r=this.uncheckedNodes[t],n=r.child.toString();n in this.minimizedNodes?r.parent.edges[r.char]=this.minimizedNodes[n]:(r.child._str=n,this.minimizedNodes[n]=r.child),this.uncheckedNodes.pop()}} -/*! - * lunr.Index - * Copyright (C) 2020 Oliver Nightingale - */,C.Index=function(e){this.invertedIndex=e.invertedIndex,this.fieldVectors=e.fieldVectors,this.tokenSet=e.tokenSet,this.fields=e.fields,this.pipeline=e.pipeline},C.Index.prototype.search=function(e){return this.query((function(t){new C.QueryParser(e,t).parse()}))},C.Index.prototype.query=function(e){for(var t=new C.Query(this.fields),r=Object.create(null),n=Object.create(null),i=Object.create(null),s=Object.create(null),o=Object.create(null),a=0;a1?1:e},C.Builder.prototype.k1=function(e){this._k1=e},C.Builder.prototype.add=function(e,t){var r=e[this._ref],n=Object.keys(this._fields);this._documents[r]=t||{},this.documentCount+=1;for(var i=0;i=this.length)return C.QueryLexer.EOS;var e=this.str.charAt(this.pos);return this.pos+=1,e},C.QueryLexer.prototype.width=function(){return this.pos-this.start},C.QueryLexer.prototype.ignore=function(){this.start==this.pos&&(this.pos+=1),this.start=this.pos},C.QueryLexer.prototype.backup=function(){this.pos-=1},C.QueryLexer.prototype.acceptDigitRun=function(){var e,t;do{t=(e=this.next()).charCodeAt(0)}while(t>47&&t<58);e!=C.QueryLexer.EOS&&this.backup()},C.QueryLexer.prototype.more=function(){return this.pos1&&(e.backup(),e.emit(C.QueryLexer.TERM)),e.ignore(),e.more())return C.QueryLexer.lexText},C.QueryLexer.lexEditDistance=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(C.QueryLexer.EDIT_DISTANCE),C.QueryLexer.lexText},C.QueryLexer.lexBoost=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(C.QueryLexer.BOOST),C.QueryLexer.lexText},C.QueryLexer.lexEOS=function(e){e.width()>0&&e.emit(C.QueryLexer.TERM)},C.QueryLexer.termSeparator=C.tokenizer.separator,C.QueryLexer.lexText=function(e){for(;;){var t=e.next();if(t==C.QueryLexer.EOS)return C.QueryLexer.lexEOS;if(92!=t.charCodeAt(0)){if(":"==t)return C.QueryLexer.lexField;if("~"==t)return e.backup(),e.width()>0&&e.emit(C.QueryLexer.TERM),C.QueryLexer.lexEditDistance;if("^"==t)return e.backup(),e.width()>0&&e.emit(C.QueryLexer.TERM),C.QueryLexer.lexBoost;if("+"==t&&1===e.width())return e.emit(C.QueryLexer.PRESENCE),C.QueryLexer.lexText;if("-"==t&&1===e.width())return e.emit(C.QueryLexer.PRESENCE),C.QueryLexer.lexText;if(t.match(C.QueryLexer.termSeparator))return C.QueryLexer.lexTerm}else e.escapeCharacter()}},C.QueryParser=function(e,t){this.lexer=new C.QueryLexer(e),this.query=t,this.currentClause={},this.lexemeIdx=0},C.QueryParser.prototype.parse=function(){this.lexer.run(),this.lexemes=this.lexer.lexemes;for(var e=C.QueryParser.parseClause;e;)e=e(this);return this.query},C.QueryParser.prototype.peekLexeme=function(){return this.lexemes[this.lexemeIdx]},C.QueryParser.prototype.consumeLexeme=function(){var e=this.peekLexeme();return this.lexemeIdx+=1,e},C.QueryParser.prototype.nextClause=function(){var e=this.currentClause;this.query.clause(e),this.currentClause={}},C.QueryParser.parseClause=function(e){var t=e.peekLexeme();if(null!=t)switch(t.type){case C.QueryLexer.PRESENCE:return C.QueryParser.parsePresence;case C.QueryLexer.FIELD:return C.QueryParser.parseField;case C.QueryLexer.TERM:return C.QueryParser.parseTerm;default:var r="expected either a field or a term, found "+t.type;throw t.str.length>=1&&(r+=" with value '"+t.str+"'"),new C.QueryParseError(r,t.start,t.end)}},C.QueryParser.parsePresence=function(e){var t=e.consumeLexeme();if(null!=t){switch(t.str){case"-":e.currentClause.presence=C.Query.presence.PROHIBITED;break;case"+":e.currentClause.presence=C.Query.presence.REQUIRED;break;default:var r="unrecognised presence operator'"+t.str+"'";throw new C.QueryParseError(r,t.start,t.end)}var n=e.peekLexeme();if(null==n){r="expecting term or field, found nothing";throw new C.QueryParseError(r,t.start,t.end)}switch(n.type){case C.QueryLexer.FIELD:return C.QueryParser.parseField;case C.QueryLexer.TERM:return C.QueryParser.parseTerm;default:r="expecting term or field, found '"+n.type+"'";throw new C.QueryParseError(r,n.start,n.end)}}},C.QueryParser.parseField=function(e){var t=e.consumeLexeme();if(null!=t){if(-1==e.query.allFields.indexOf(t.str)){var r=e.query.allFields.map((function(e){return"'"+e+"'"})).join(", "),n="unrecognised field '"+t.str+"', possible fields: "+r;throw new C.QueryParseError(n,t.start,t.end)}e.currentClause.fields=[t.str];var i=e.peekLexeme();if(null==i){n="expecting term, found nothing";throw new C.QueryParseError(n,t.start,t.end)}switch(i.type){case C.QueryLexer.TERM:return C.QueryParser.parseTerm;default:n="expecting term, found '"+i.type+"'";throw new C.QueryParseError(n,i.start,i.end)}}},C.QueryParser.parseTerm=function(e){var t=e.consumeLexeme();if(null!=t){e.currentClause.term=t.str.toLowerCase(),-1!=t.str.indexOf("*")&&(e.currentClause.usePipeline=!1);var r=e.peekLexeme();if(null!=r)switch(r.type){case C.QueryLexer.TERM:return e.nextClause(),C.QueryParser.parseTerm;case C.QueryLexer.FIELD:return e.nextClause(),C.QueryParser.parseField;case C.QueryLexer.EDIT_DISTANCE:return C.QueryParser.parseEditDistance;case C.QueryLexer.BOOST:return C.QueryParser.parseBoost;case C.QueryLexer.PRESENCE:return e.nextClause(),C.QueryParser.parsePresence;default:var n="Unexpected lexeme type '"+r.type+"'";throw new C.QueryParseError(n,r.start,r.end)}else e.nextClause()}},C.QueryParser.parseEditDistance=function(e){var t=e.consumeLexeme();if(null!=t){var r=parseInt(t.str,10);if(isNaN(r)){var n="edit distance must be numeric";throw new C.QueryParseError(n,t.start,t.end)}e.currentClause.editDistance=r;var i=e.peekLexeme();if(null!=i)switch(i.type){case C.QueryLexer.TERM:return e.nextClause(),C.QueryParser.parseTerm;case C.QueryLexer.FIELD:return e.nextClause(),C.QueryParser.parseField;case C.QueryLexer.EDIT_DISTANCE:return C.QueryParser.parseEditDistance;case C.QueryLexer.BOOST:return C.QueryParser.parseBoost;case C.QueryLexer.PRESENCE:return e.nextClause(),C.QueryParser.parsePresence;default:n="Unexpected lexeme type '"+i.type+"'";throw new C.QueryParseError(n,i.start,i.end)}else e.nextClause()}},C.QueryParser.parseBoost=function(e){var t=e.consumeLexeme();if(null!=t){var r=parseInt(t.str,10);if(isNaN(r)){var n="boost must be numeric";throw new C.QueryParseError(n,t.start,t.end)}e.currentClause.boost=r;var i=e.peekLexeme();if(null!=i)switch(i.type){case C.QueryLexer.TERM:return e.nextClause(),C.QueryParser.parseTerm;case C.QueryLexer.FIELD:return e.nextClause(),C.QueryParser.parseField;case C.QueryLexer.EDIT_DISTANCE:return C.QueryParser.parseEditDistance;case C.QueryLexer.BOOST:return C.QueryParser.parseBoost;case C.QueryLexer.PRESENCE:return e.nextClause(),C.QueryParser.parsePresence;default:n="Unexpected lexeme type '"+i.type+"'";throw new C.QueryParseError(n,i.start,i.end)}else e.nextClause()}},void 0===(i="function"==typeof(n=function(){return C})?n.call(t,r,t,e):n)||(e.exports=i)}()},function(e,t,r){},function(e,t,r){"use strict";r.r(t);var n=[];function i(e,t){n.push({selector:t,constructor:e})}var s,o,a=function(){function e(){this.createComponents(document.body)}return e.prototype.createComponents=function(e){n.forEach((function(t){e.querySelectorAll(t.selector).forEach((function(e){e.dataset.hasInstance||(new t.constructor({el:e}),e.dataset.hasInstance=String(!0))}))}))},e}(),u=function(e){this.el=e.el},l=r(0),c=(s=function(e,t){return(s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}s(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});!function(e){e[e.Idle=0]="Idle",e[e.Loading=1]="Loading",e[e.Ready=2]="Ready",e[e.Failure=3]="Failure"}(o||(o={}));var h=function(e){function t(t){var r=e.call(this,t)||this;r.query="",r.loadingState=o.Idle,r.hasFocus=!1,r.preventPress=!1,r.data=null,r.index=null,r.resultClicked=!1;var n=document.querySelector("#tsd-search-field"),i=document.querySelector(".results");if(!n||!i)throw new Error("The input field or the result list wrapper are not found");return r.field=n,r.results=i,r.base=r.el.dataset.base+"/",r.bindEvents(),r}return c(t,e),t.prototype.loadIndex=function(){var e=this;if(this.loadingState==o.Idle&&!this.data){setTimeout((function(){e.loadingState==o.Idle&&e.setLoadingState(o.Loading)}),500);var t=this.el.dataset.index;t?fetch(t).then((function(e){if(!e.ok)throw new Error("The search index is missing");return e.json()})).then((function(t){e.data=t,e.index=l.Index.load(t.index),e.setLoadingState(o.Ready)})).catch((function(t){console.error(t),e.setLoadingState(o.Failure)})):this.setLoadingState(o.Failure)}},t.prototype.updateResults=function(){if(this.loadingState==o.Ready&&(this.results.textContent="",this.query&&this.index&&this.data)){var e=this.index.search("*"+this.query+"*");0===e.length&&(e=this.index.search("*"+this.query+"~1*"));for(var t=0,r=Math.min(10,e.length);t"+e+""})),s=n.parent||"";(s=s.replace(new RegExp(this.query,"i"),(function(e){return""+e+""})))&&(i=''+s+"."+i);var a=document.createElement("li");a.classList.value=n.classes,a.innerHTML='\n '+i+"\n ",this.results.appendChild(a)}}},t.prototype.setLoadingState=function(e){this.loadingState!=e&&(this.el.classList.remove(o[this.loadingState].toLowerCase()),this.loadingState=e,this.el.classList.add(o[this.loadingState].toLowerCase()),this.updateResults())},t.prototype.setHasFocus=function(e){this.hasFocus!=e&&(this.hasFocus=e,this.el.classList.toggle("has-focus"),e?(this.setQuery(""),this.field.value=""):this.field.value=this.query)},t.prototype.setQuery=function(e){this.query=e.trim(),this.updateResults()},t.prototype.setCurrentResult=function(e){var t=this.results.querySelector(".current");if(t){var r=1==e?t.nextElementSibling:t.previousElementSibling;r&&(t.classList.remove("current"),r.classList.add("current"))}else(t=this.results.querySelector(1==e?"li:first-child":"li:last-child"))&&t.classList.add("current")},t.prototype.gotoCurrentResult=function(){var e=this.results.querySelector(".current");if(e||(e=this.results.querySelector("li:first-child")),e){var t=e.querySelector("a");t&&(window.location.href=t.href),this.field.blur()}},t.prototype.bindEvents=function(){var e=this;this.results.addEventListener("mousedown",(function(){e.resultClicked=!0})),this.results.addEventListener("mouseup",(function(){e.resultClicked=!1,e.setHasFocus(!1)})),this.field.addEventListener("focusin",(function(){e.setHasFocus(!0),e.loadIndex()})),this.field.addEventListener("focusout",(function(){e.resultClicked?e.resultClicked=!1:setTimeout((function(){return e.setHasFocus(!1)}),100)})),this.field.addEventListener("input",(function(){e.setQuery(e.field.value)})),this.field.addEventListener("keydown",(function(t){13==t.keyCode||27==t.keyCode||38==t.keyCode||40==t.keyCode?(e.preventPress=!0,t.preventDefault(),13==t.keyCode?e.gotoCurrentResult():27==t.keyCode?e.field.blur():38==t.keyCode?e.setCurrentResult(-1):40==t.keyCode&&e.setCurrentResult(1)):e.preventPress=!1})),this.field.addEventListener("keypress",(function(t){e.preventPress&&t.preventDefault()})),document.body.addEventListener("keydown",(function(t){t.altKey||t.ctrlKey||t.metaKey||!e.hasFocus&&t.keyCode>47&&t.keyCode<112&&e.field.focus()}))},t}(u),d=function(){function e(){this.listeners={}}return e.prototype.addEventListener=function(e,t){e in this.listeners||(this.listeners[e]=[]),this.listeners[e].push(t)},e.prototype.removeEventListener=function(e,t){if(e in this.listeners)for(var r=this.listeners[e],n=0,i=r.length;n=this.scrollTop||0===this.scrollTop,e!==this.showToolbar&&(this.toolbar.classList.toggle("tsd-page-toolbar--hide"),this.secondaryNav.classList.toggle("tsd-navigation--toolbar-hide")),this.lastY=this.scrollTop},t.instance=new t,t}(d),m=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),v=function(e){function t(t){var r=e.call(this,t)||this;return r.anchors=[],r.index=-1,y.instance.addEventListener("resize",(function(){return r.onResize()})),y.instance.addEventListener("scroll",(function(e){return r.onScroll(e)})),r.createAnchors(),r}return m(t,e),t.prototype.createAnchors=function(){var e=this,t=window.location.href;-1!=t.indexOf("#")&&(t=t.substr(0,t.indexOf("#"))),this.el.querySelectorAll("a").forEach((function(r){var n=r.href;if(-1!=n.indexOf("#")&&n.substr(0,t.length)==t){var i=n.substr(n.indexOf("#")+1),s=document.querySelector("a.tsd-anchor[name="+i+"]"),o=r.parentNode;s&&o&&e.anchors.push({link:o,anchor:s,position:0})}})),this.onResize()},t.prototype.onResize=function(){for(var e,t=0,r=this.anchors.length;t-1&&r[i].position>t;)i-=1;for(;i-1&&this.anchors[this.index].link.classList.remove("focus"),this.index=i,this.index>-1&&this.anchors[this.index].link.classList.add("focus"))},t}(u),g=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),x=function(){function e(e,t){this.signature=e,this.description=t}return e.prototype.addClass=function(e){return this.signature.classList.add(e),this.description.classList.add(e),this},e.prototype.removeClass=function(e){return this.signature.classList.remove(e),this.description.classList.remove(e),this},e}(),w=function(e){function t(t){var r=e.call(this,t)||this;return r.groups=[],r.index=-1,r.createGroups(),r.container&&(r.el.classList.add("active"),Array.from(r.el.children).forEach((function(e){e.addEventListener("touchstart",(function(e){return r.onClick(e)})),e.addEventListener("click",(function(e){return r.onClick(e)}))})),r.container.classList.add("active"),r.setIndex(0)),r}return g(t,e),t.prototype.setIndex=function(e){if(e<0&&(e=0),e>this.groups.length-1&&(e=this.groups.length-1),this.index!=e){var t=this.groups[e];if(this.index>-1){var r=this.groups[this.index];r.removeClass("current").addClass("fade-out"),t.addClass("current"),t.addClass("fade-in"),y.instance.triggerResize(),setTimeout((function(){r.removeClass("fade-out"),t.removeClass("fade-in")}),300)}else t.addClass("current"),y.instance.triggerResize();this.index=e}},t.prototype.createGroups=function(){var e=this.el.children;if(!(e.length<2)){this.container=this.el.nextElementSibling;var t=this.container.children;this.groups=[];for(var r=0;r10}})),document.addEventListener(b,(function(){Q=!1})),document.addEventListener("click",(function(e){k&&(e.preventDefault(),e.stopImmediatePropagation(),k=!1)}));var T=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),_=function(e){function t(t){var r=e.call(this,t)||this;return r.className=r.el.dataset.toggle||"",r.el.addEventListener(b,(function(e){return r.onPointerUp(e)})),r.el.addEventListener("click",(function(e){return e.preventDefault()})),document.addEventListener(L,(function(e){return r.onDocumentPointerDown(e)})),document.addEventListener(b,(function(e){return r.onDocumentPointerUp(e)})),r}return T(t,e),t.prototype.setActive=function(e){if(this.active!=e){this.active=e,document.documentElement.classList.toggle("has-"+this.className,e),this.el.classList.toggle("active",e);var t=(this.active?"to-has-":"from-has-")+this.className;document.documentElement.classList.add(t),setTimeout((function(){return document.documentElement.classList.remove(t)}),500)}},t.prototype.onPointerUp=function(e){O||(this.setActive(!0),e.preventDefault())},t.prototype.onDocumentPointerDown=function(e){if(this.active){if(e.target.closest(".col-menu, .tsd-filter-group"))return;this.setActive(!1)}},t.prototype.onDocumentPointerUp=function(e){var t=this;if(!O&&this.active&&e.target.closest(".col-menu")){var r=e.target.closest("a");if(r){var n=window.location.href;-1!=n.indexOf("#")&&(n=n.substr(0,n.indexOf("#"))),r.href.substr(0,n.length)==n&&setTimeout((function(){return t.setActive(!1)}),250)}}},t}(u),C=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),R=function(){function e(e,t){this.key=e,this.value=t,this.defaultValue=t,this.initialize(),window.localStorage[this.key]&&this.setValue(this.fromLocalStorage(window.localStorage[this.key]))}return e.prototype.initialize=function(){},e.prototype.setValue=function(e){if(this.value!=e){var t=this.value;this.value=e,window.localStorage[this.key]=this.toLocalStorage(e),this.handleValueChange(t,e)}},e}(),I=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return C(t,e),t.prototype.initialize=function(){var e=this,t=document.querySelector("#tsd-filter-"+this.key);t&&(this.checkbox=t,this.checkbox.addEventListener("change",(function(){e.setValue(e.checkbox.checked)})))},t.prototype.handleValueChange=function(e,t){this.checkbox&&(this.checkbox.checked=this.value,document.documentElement.classList.toggle("toggle-"+this.key,this.value!=this.defaultValue))},t.prototype.fromLocalStorage=function(e){return"true"==e},t.prototype.toLocalStorage=function(e){return e?"true":"false"},t}(R),j=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return C(t,e),t.prototype.initialize=function(){var e=this;document.documentElement.classList.add("toggle-"+this.key+this.value);var t=document.querySelector("#tsd-filter-"+this.key);if(t){this.select=t;var r=function(){e.select.classList.add("active")};this.select.addEventListener(L,r),this.select.addEventListener("mouseover",r),this.select.addEventListener("mouseleave",(function(){e.select.classList.remove("active")})),this.select.querySelectorAll("li").forEach((function(r){r.addEventListener(b,(function(r){t.classList.remove("active"),e.setValue(r.target.dataset.value||"")}))})),document.addEventListener(L,(function(t){e.select.contains(t.target)||e.select.classList.remove("active")}))}},t.prototype.handleValueChange=function(e,t){this.select.querySelectorAll("li.selected").forEach((function(e){e.classList.remove("selected")}));var r=this.select.querySelector('li[data-value="'+t+'"]'),n=this.select.querySelector(".tsd-select-label");r&&n&&(r.classList.add("selected"),n.textContent=r.textContent),document.documentElement.classList.remove("toggle-"+e),document.documentElement.classList.add("toggle-"+t)},t.prototype.fromLocalStorage=function(e){return e},t.prototype.toLocalStorage=function(e){return e},t}(R),F=function(e){function t(t){var r=e.call(this,t)||this;return r.optionVisibility=new j("visibility","private"),r.optionInherited=new I("inherited",!0),r.optionExternals=new I("externals",!0),r.optionOnlyExported=new I("only-exported",!1),r}return C(t,e),t.isSupported=function(){try{return void 0!==window.localStorage}catch(e){return!1}},t}(u);r(1);i(h,"#tsd-search"),i(v,".menu-highlight"),i(w,".tsd-signatures"),i(_,"a[data-toggle]"),F.isSupported()?i(F,"#tsd-filter"):document.documentElement.classList.add("no-filter");var N=new a;Object.defineProperty(window,"app",{value:N})}]); \ No newline at end of file diff --git a/docs/assets/js/search.json b/docs/assets/js/search.json deleted file mode 100644 index d3dd1b4..0000000 --- a/docs/assets/js/search.json +++ /dev/null @@ -1 +0,0 @@ -{"kinds":{"1":"Module","4":"Enumeration","16":"Enumeration member","128":"Class","512":"Constructor","1024":"Property","2048":"Method","262144":"Accessor","4194304":"Type alias","16777216":"Reference"},"rows":[{"id":0,"kind":1,"name":"\"src/types\"","url":"modules/_src_types_.html","classes":"tsd-kind-module"},{"id":1,"kind":4,"name":"PromiseState","url":"enums/_src_types_.promisestate.html","classes":"tsd-kind-enum tsd-parent-kind-module","parent":"\"src/types\""},{"id":2,"kind":16,"name":"Pending","url":"enums/_src_types_.promisestate.html#pending","classes":"tsd-kind-enum-member tsd-parent-kind-enum","parent":"\"src/types\".PromiseState"},{"id":3,"kind":16,"name":"Resolving","url":"enums/_src_types_.promisestate.html#resolving","classes":"tsd-kind-enum-member tsd-parent-kind-enum","parent":"\"src/types\".PromiseState"},{"id":4,"kind":16,"name":"Resolved","url":"enums/_src_types_.promisestate.html#resolved","classes":"tsd-kind-enum-member tsd-parent-kind-enum","parent":"\"src/types\".PromiseState"},{"id":5,"kind":16,"name":"Rejecting","url":"enums/_src_types_.promisestate.html#rejecting","classes":"tsd-kind-enum-member tsd-parent-kind-enum","parent":"\"src/types\".PromiseState"},{"id":6,"kind":16,"name":"Rejected","url":"enums/_src_types_.promisestate.html#rejected","classes":"tsd-kind-enum-member tsd-parent-kind-enum","parent":"\"src/types\".PromiseState"},{"id":7,"kind":16,"name":"Cancelled","url":"enums/_src_types_.promisestate.html#cancelled","classes":"tsd-kind-enum-member tsd-parent-kind-enum","parent":"\"src/types\".PromiseState"},{"id":8,"kind":4194304,"name":"Item","url":"modules/_src_types_.html#item","classes":"tsd-kind-type-alias tsd-parent-kind-module tsd-has-type-parameter","parent":"\"src/types\""},{"id":9,"kind":4194304,"name":"Unpromise","url":"modules/_src_types_.html#unpromise","classes":"tsd-kind-type-alias tsd-parent-kind-module tsd-has-type-parameter","parent":"\"src/types\""},{"id":10,"kind":4194304,"name":"Promisable","url":"modules/_src_types_.html#promisable","classes":"tsd-kind-type-alias tsd-parent-kind-module tsd-has-type-parameter","parent":"\"src/types\""},{"id":11,"kind":4194304,"name":"SimplifiedPromise","url":"modules/_src_types_.html#simplifiedpromise","classes":"tsd-kind-type-alias tsd-parent-kind-module tsd-has-type-parameter","parent":"\"src/types\""},{"id":12,"kind":4194304,"name":"SimplifiedPromiseLike","url":"modules/_src_types_.html#simplifiedpromiselike","classes":"tsd-kind-type-alias tsd-parent-kind-module tsd-has-type-parameter","parent":"\"src/types\""},{"id":13,"kind":4194304,"name":"SimplifiedPromisable","url":"modules/_src_types_.html#simplifiedpromisable","classes":"tsd-kind-type-alias tsd-parent-kind-module tsd-has-type-parameter","parent":"\"src/types\""},{"id":14,"kind":4194304,"name":"PromisableIterable","url":"modules/_src_types_.html#promisableiterable","classes":"tsd-kind-type-alias tsd-parent-kind-module tsd-has-type-parameter","parent":"\"src/types\""},{"id":15,"kind":4194304,"name":"IterableOfPromisables","url":"modules/_src_types_.html#iterableofpromisables","classes":"tsd-kind-type-alias tsd-parent-kind-module tsd-has-type-parameter","parent":"\"src/types\""},{"id":16,"kind":1,"name":"\"src/fun-promise\"","url":"modules/_src_fun_promise_.html","classes":"tsd-kind-module"},{"id":17,"kind":128,"name":"FunPromise","url":"classes/_src_fun_promise_.funpromise.html","classes":"tsd-kind-class tsd-parent-kind-module tsd-has-type-parameter","parent":"\"src/fun-promise\""},{"id":18,"kind":512,"name":"constructor","url":"classes/_src_fun_promise_.funpromise.html#constructor","classes":"tsd-kind-constructor tsd-parent-kind-class","parent":"\"src/fun-promise\".FunPromise"},{"id":19,"kind":1024,"name":"wrapped","url":"classes/_src_fun_promise_.funpromise.html#wrapped","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-protected","parent":"\"src/fun-promise\".FunPromise"},{"id":20,"kind":2048,"name":"resolve","url":"classes/_src_fun_promise_.funpromise.html#resolve-1","classes":"tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-static","parent":"\"src/fun-promise\".FunPromise"},{"id":21,"kind":2048,"name":"resolve","url":"classes/_src_fun_promise_.funpromise.html#resolve","classes":"tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter","parent":"\"src/fun-promise\".FunPromise"},{"id":22,"kind":2048,"name":"reject","url":"classes/_src_fun_promise_.funpromise.html#reject-1","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-static","parent":"\"src/fun-promise\".FunPromise"},{"id":23,"kind":2048,"name":"reject","url":"classes/_src_fun_promise_.funpromise.html#reject","classes":"tsd-kind-method tsd-parent-kind-class","parent":"\"src/fun-promise\".FunPromise"},{"id":24,"kind":2048,"name":"then","url":"classes/_src_fun_promise_.funpromise.html#then","classes":"tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter","parent":"\"src/fun-promise\".FunPromise"},{"id":25,"kind":2048,"name":"catch","url":"classes/_src_fun_promise_.funpromise.html#catch","classes":"tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter","parent":"\"src/fun-promise\".FunPromise"},{"id":26,"kind":2048,"name":"all","url":"classes/_src_fun_promise_.funpromise.html#all-1","classes":"tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-static","parent":"\"src/fun-promise\".FunPromise"},{"id":27,"kind":2048,"name":"all","url":"classes/_src_fun_promise_.funpromise.html#all","classes":"tsd-kind-method tsd-parent-kind-class","parent":"\"src/fun-promise\".FunPromise"},{"id":28,"kind":2048,"name":"try","url":"classes/_src_fun_promise_.funpromise.html#try","classes":"tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-static","parent":"\"src/fun-promise\".FunPromise"},{"id":29,"kind":2048,"name":"simplify","url":"classes/_src_fun_promise_.funpromise.html#simplify","classes":"tsd-kind-method tsd-parent-kind-class","parent":"\"src/fun-promise\".FunPromise"},{"id":30,"kind":2048,"name":"arrayify","url":"classes/_src_fun_promise_.funpromise.html#arrayify","classes":"tsd-kind-method tsd-parent-kind-class","parent":"\"src/fun-promise\".FunPromise"},{"id":31,"kind":2048,"name":"map","url":"classes/_src_fun_promise_.funpromise.html#map","classes":"tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter","parent":"\"src/fun-promise\".FunPromise"},{"id":32,"kind":2048,"name":"map","url":"classes/_src_fun_promise_.funpromise.html#map-1","classes":"tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-static","parent":"\"src/fun-promise\".FunPromise"},{"id":33,"kind":262144,"name":"[Symbol.toStringTag]","url":"classes/_src_fun_promise_.funpromise.html#_symbol_tostringtag_","classes":"tsd-kind-get-signature tsd-parent-kind-class","parent":"\"src/fun-promise\".FunPromise"},{"id":34,"kind":2048,"name":"finally","url":"classes/_src_fun_promise_.funpromise.html#finally","classes":"tsd-kind-method tsd-parent-kind-class","parent":"\"src/fun-promise\".FunPromise"},{"id":35,"kind":2048,"name":"coalesce","url":"classes/_src_fun_promise_.funpromise.html#coalesce","classes":"tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-static","parent":"\"src/fun-promise\".FunPromise"},{"id":36,"kind":2048,"name":"delay","url":"classes/_src_fun_promise_.funpromise.html#delay-1","classes":"tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-static","parent":"\"src/fun-promise\".FunPromise"},{"id":37,"kind":2048,"name":"delay","url":"classes/_src_fun_promise_.funpromise.html#delay","classes":"tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter","parent":"\"src/fun-promise\".FunPromise"},{"id":38,"kind":2048,"name":"filter","url":"classes/_src_fun_promise_.funpromise.html#filter","classes":"tsd-kind-method tsd-parent-kind-class","parent":"\"src/fun-promise\".FunPromise"},{"id":39,"kind":2048,"name":"filter","url":"classes/_src_fun_promise_.funpromise.html#filter-1","classes":"tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-static","parent":"\"src/fun-promise\".FunPromise"},{"id":40,"kind":2048,"name":"flatMap","url":"classes/_src_fun_promise_.funpromise.html#flatmap","classes":"tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter","parent":"\"src/fun-promise\".FunPromise"},{"id":41,"kind":2048,"name":"flatMap","url":"classes/_src_fun_promise_.funpromise.html#flatmap-1","classes":"tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-static","parent":"\"src/fun-promise\".FunPromise"},{"id":42,"kind":2048,"name":"tap","url":"classes/_src_fun_promise_.funpromise.html#tap","classes":"tsd-kind-method tsd-parent-kind-class","parent":"\"src/fun-promise\".FunPromise"},{"id":43,"kind":2048,"name":"tapCatch","url":"classes/_src_fun_promise_.funpromise.html#tapcatch","classes":"tsd-kind-method tsd-parent-kind-class","parent":"\"src/fun-promise\".FunPromise"},{"id":44,"kind":2048,"name":"tapEach","url":"classes/_src_fun_promise_.funpromise.html#tapeach","classes":"tsd-kind-method tsd-parent-kind-class","parent":"\"src/fun-promise\".FunPromise"},{"id":45,"kind":2048,"name":"fold","url":"classes/_src_fun_promise_.funpromise.html#fold","classes":"tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter","parent":"\"src/fun-promise\".FunPromise"},{"id":46,"kind":2048,"name":"fold","url":"classes/_src_fun_promise_.funpromise.html#fold-1","classes":"tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-static","parent":"\"src/fun-promise\".FunPromise"},{"id":47,"kind":1,"name":"\"src/deferral\"","url":"modules/_src_deferral_.html","classes":"tsd-kind-module"},{"id":48,"kind":128,"name":"Deferral","url":"classes/_src_deferral_.deferral.html","classes":"tsd-kind-class tsd-parent-kind-module tsd-has-type-parameter","parent":"\"src/deferral\""},{"id":49,"kind":1024,"name":"promise","url":"classes/_src_deferral_.deferral.html#promise","classes":"tsd-kind-property tsd-parent-kind-class","parent":"\"src/deferral\".Deferral"},{"id":50,"kind":262144,"name":"state","url":"classes/_src_deferral_.deferral.html#state","classes":"tsd-kind-get-signature tsd-parent-kind-class","parent":"\"src/deferral\".Deferral"},{"id":51,"kind":262144,"name":"isSettling","url":"classes/_src_deferral_.deferral.html#issettling","classes":"tsd-kind-get-signature tsd-parent-kind-class","parent":"\"src/deferral\".Deferral"},{"id":52,"kind":262144,"name":"isSettled","url":"classes/_src_deferral_.deferral.html#issettled","classes":"tsd-kind-get-signature tsd-parent-kind-class","parent":"\"src/deferral\".Deferral"},{"id":53,"kind":262144,"name":"isResolved","url":"classes/_src_deferral_.deferral.html#isresolved","classes":"tsd-kind-get-signature tsd-parent-kind-class","parent":"\"src/deferral\".Deferral"},{"id":54,"kind":262144,"name":"isRejected","url":"classes/_src_deferral_.deferral.html#isrejected","classes":"tsd-kind-get-signature tsd-parent-kind-class","parent":"\"src/deferral\".Deferral"},{"id":55,"kind":2048,"name":"resolve","url":"classes/_src_deferral_.deferral.html#resolve","classes":"tsd-kind-method tsd-parent-kind-class","parent":"\"src/deferral\".Deferral"},{"id":56,"kind":2048,"name":"reject","url":"classes/_src_deferral_.deferral.html#reject","classes":"tsd-kind-method tsd-parent-kind-class","parent":"\"src/deferral\".Deferral"},{"id":57,"kind":512,"name":"constructor","url":"classes/_src_deferral_.deferral.html#constructor","classes":"tsd-kind-constructor tsd-parent-kind-class","parent":"\"src/deferral\".Deferral"},{"id":58,"kind":262144,"name":"isCancelled","url":"classes/_src_deferral_.deferral.html#iscancelled","classes":"tsd-kind-get-signature tsd-parent-kind-class","parent":"\"src/deferral\".Deferral"},{"id":59,"kind":2048,"name":"cancel","url":"classes/_src_deferral_.deferral.html#cancel","classes":"tsd-kind-method tsd-parent-kind-class","parent":"\"src/deferral\".Deferral"},{"id":60,"kind":1,"name":"\"index\"","url":"modules/_index_.html","classes":"tsd-kind-module"},{"id":61,"kind":16777216,"name":"Item","url":"modules/_index_.html#item","classes":"tsd-kind-reference tsd-parent-kind-module","parent":"\"index\""},{"id":62,"kind":16777216,"name":"Unpromise","url":"modules/_index_.html#unpromise","classes":"tsd-kind-reference tsd-parent-kind-module","parent":"\"index\""},{"id":63,"kind":16777216,"name":"Promisable","url":"modules/_index_.html#promisable","classes":"tsd-kind-reference tsd-parent-kind-module","parent":"\"index\""},{"id":64,"kind":16777216,"name":"SimplifiedPromise","url":"modules/_index_.html#simplifiedpromise","classes":"tsd-kind-reference tsd-parent-kind-module","parent":"\"index\""},{"id":65,"kind":16777216,"name":"SimplifiedPromiseLike","url":"modules/_index_.html#simplifiedpromiselike","classes":"tsd-kind-reference tsd-parent-kind-module","parent":"\"index\""},{"id":66,"kind":16777216,"name":"SimplifiedPromisable","url":"modules/_index_.html#simplifiedpromisable","classes":"tsd-kind-reference tsd-parent-kind-module","parent":"\"index\""},{"id":67,"kind":16777216,"name":"PromisableIterable","url":"modules/_index_.html#promisableiterable","classes":"tsd-kind-reference tsd-parent-kind-module","parent":"\"index\""},{"id":68,"kind":16777216,"name":"IterableOfPromisables","url":"modules/_index_.html#iterableofpromisables","classes":"tsd-kind-reference tsd-parent-kind-module","parent":"\"index\""},{"id":69,"kind":16777216,"name":"PromiseState","url":"modules/_index_.html#promisestate","classes":"tsd-kind-reference tsd-parent-kind-module","parent":"\"index\""},{"id":70,"kind":1,"name":"\"src/fun-promise.test\"","url":"modules/_src_fun_promise_test_.html","classes":"tsd-kind-module"}],"index":{"version":"2.3.9","fields":["name","parent"],"fieldVectors":[["name/0",[0,19.471]],["parent/0",[]],["name/1",[1,33.985]],["parent/1",[0,2.155]],["name/2",[2,39.151]],["parent/2",[3,2.692]],["name/3",[4,39.151]],["parent/3",[3,2.692]],["name/4",[5,39.151]],["parent/4",[3,2.692]],["name/5",[6,39.151]],["parent/5",[3,2.692]],["name/6",[7,39.151]],["parent/6",[3,2.692]],["name/7",[8,39.151]],["parent/7",[3,2.692]],["name/8",[9,33.985]],["parent/8",[0,2.155]],["name/9",[10,33.985]],["parent/9",[0,2.155]],["name/10",[11,33.985]],["parent/10",[0,2.155]],["name/11",[12,33.985]],["parent/11",[0,2.155]],["name/12",[13,33.985]],["parent/12",[0,2.155]],["name/13",[14,33.985]],["parent/13",[0,2.155]],["name/14",[15,33.985]],["parent/14",[0,2.155]],["name/15",[16,33.985]],["parent/15",[0,2.155]],["name/16",[17,5.736,18,21.807]],["parent/16",[]],["name/17",[19,39.151]],["parent/17",[17,0.665,18,2.528]],["name/18",[20,33.985]],["parent/18",[17,0.665,21,0.746]],["name/19",[22,39.151]],["parent/19",[17,0.665,21,0.746]],["name/20",[23,30.582]],["parent/20",[17,0.665,21,0.746]],["name/21",[23,30.582]],["parent/21",[17,0.665,21,0.746]],["name/22",[24,30.582]],["parent/22",[17,0.665,21,0.746]],["name/23",[24,30.582]],["parent/23",[17,0.665,21,0.746]],["name/24",[25,39.151]],["parent/24",[17,0.665,21,0.746]],["name/25",[26,39.151]],["parent/25",[17,0.665,21,0.746]],["name/26",[27,33.985]],["parent/26",[17,0.665,21,0.746]],["name/27",[27,33.985]],["parent/27",[17,0.665,21,0.746]],["name/28",[28,39.151]],["parent/28",[17,0.665,21,0.746]],["name/29",[29,39.151]],["parent/29",[17,0.665,21,0.746]],["name/30",[30,39.151]],["parent/30",[17,0.665,21,0.746]],["name/31",[31,33.985]],["parent/31",[17,0.665,21,0.746]],["name/32",[31,33.985]],["parent/32",[17,0.665,21,0.746]],["name/33",[32,39.151]],["parent/33",[17,0.665,21,0.746]],["name/34",[33,39.151]],["parent/34",[17,0.665,21,0.746]],["name/35",[34,39.151]],["parent/35",[17,0.665,21,0.746]],["name/36",[35,33.985]],["parent/36",[17,0.665,21,0.746]],["name/37",[35,33.985]],["parent/37",[17,0.665,21,0.746]],["name/38",[36,33.985]],["parent/38",[17,0.665,21,0.746]],["name/39",[36,33.985]],["parent/39",[17,0.665,21,0.746]],["name/40",[37,33.985]],["parent/40",[17,0.665,21,0.746]],["name/41",[37,33.985]],["parent/41",[17,0.665,21,0.746]],["name/42",[38,39.151]],["parent/42",[17,0.665,21,0.746]],["name/43",[39,39.151]],["parent/43",[17,0.665,21,0.746]],["name/44",[40,39.151]],["parent/44",[17,0.665,21,0.746]],["name/45",[41,33.985]],["parent/45",[17,0.665,21,0.746]],["name/46",[41,33.985]],["parent/46",[17,0.665,21,0.746]],["name/47",[42,33.985]],["parent/47",[]],["name/48",[43,39.151]],["parent/48",[42,3.761]],["name/49",[18,30.582]],["parent/49",[44,2.053]],["name/50",[45,39.151]],["parent/50",[44,2.053]],["name/51",[46,39.151]],["parent/51",[44,2.053]],["name/52",[47,39.151]],["parent/52",[44,2.053]],["name/53",[48,39.151]],["parent/53",[44,2.053]],["name/54",[49,39.151]],["parent/54",[44,2.053]],["name/55",[23,30.582]],["parent/55",[44,2.053]],["name/56",[24,30.582]],["parent/56",[44,2.053]],["name/57",[20,33.985]],["parent/57",[44,2.053]],["name/58",[50,39.151]],["parent/58",[44,2.053]],["name/59",[51,39.151]],["parent/59",[44,2.053]],["name/60",[52,19.471]],["parent/60",[]],["name/61",[9,33.985]],["parent/61",[52,2.155]],["name/62",[10,33.985]],["parent/62",[52,2.155]],["name/63",[11,33.985]],["parent/63",[52,2.155]],["name/64",[12,33.985]],["parent/64",[52,2.155]],["name/65",[13,33.985]],["parent/65",[52,2.155]],["name/66",[14,33.985]],["parent/66",[52,2.155]],["name/67",[15,33.985]],["parent/67",[52,2.155]],["name/68",[16,33.985]],["parent/68",[52,2.155]],["name/69",[1,33.985]],["parent/69",[52,2.155]],["name/70",[17,5.736,53,27.917]],["parent/70",[]]],"invertedIndex":[["all",{"_index":27,"name":{"26":{},"27":{}},"parent":{}}],["arrayify",{"_index":30,"name":{"30":{}},"parent":{}}],["cancel",{"_index":51,"name":{"59":{}},"parent":{}}],["cancelled",{"_index":8,"name":{"7":{}},"parent":{}}],["catch",{"_index":26,"name":{"25":{}},"parent":{}}],["coalesce",{"_index":34,"name":{"35":{}},"parent":{}}],["constructor",{"_index":20,"name":{"18":{},"57":{}},"parent":{}}],["deferral",{"_index":43,"name":{"48":{}},"parent":{}}],["delay",{"_index":35,"name":{"36":{},"37":{}},"parent":{}}],["filter",{"_index":36,"name":{"38":{},"39":{}},"parent":{}}],["finally",{"_index":33,"name":{"34":{}},"parent":{}}],["flatmap",{"_index":37,"name":{"40":{},"41":{}},"parent":{}}],["fold",{"_index":41,"name":{"45":{},"46":{}},"parent":{}}],["funpromise",{"_index":19,"name":{"17":{}},"parent":{}}],["index",{"_index":52,"name":{"60":{}},"parent":{"61":{},"62":{},"63":{},"64":{},"65":{},"66":{},"67":{},"68":{},"69":{}}}],["iscancelled",{"_index":50,"name":{"58":{}},"parent":{}}],["isrejected",{"_index":49,"name":{"54":{}},"parent":{}}],["isresolved",{"_index":48,"name":{"53":{}},"parent":{}}],["issettled",{"_index":47,"name":{"52":{}},"parent":{}}],["issettling",{"_index":46,"name":{"51":{}},"parent":{}}],["item",{"_index":9,"name":{"8":{},"61":{}},"parent":{}}],["iterableofpromisables",{"_index":16,"name":{"15":{},"68":{}},"parent":{}}],["map",{"_index":31,"name":{"31":{},"32":{}},"parent":{}}],["pending",{"_index":2,"name":{"2":{}},"parent":{}}],["promisable",{"_index":11,"name":{"10":{},"63":{}},"parent":{}}],["promisableiterable",{"_index":15,"name":{"14":{},"67":{}},"parent":{}}],["promise",{"_index":18,"name":{"16":{},"49":{}},"parent":{"17":{}}}],["promise\".funpromise",{"_index":21,"name":{},"parent":{"18":{},"19":{},"20":{},"21":{},"22":{},"23":{},"24":{},"25":{},"26":{},"27":{},"28":{},"29":{},"30":{},"31":{},"32":{},"33":{},"34":{},"35":{},"36":{},"37":{},"38":{},"39":{},"40":{},"41":{},"42":{},"43":{},"44":{},"45":{},"46":{}}}],["promise.test",{"_index":53,"name":{"70":{}},"parent":{}}],["promisestate",{"_index":1,"name":{"1":{},"69":{}},"parent":{}}],["reject",{"_index":24,"name":{"22":{},"23":{},"56":{}},"parent":{}}],["rejected",{"_index":7,"name":{"6":{}},"parent":{}}],["rejecting",{"_index":6,"name":{"5":{}},"parent":{}}],["resolve",{"_index":23,"name":{"20":{},"21":{},"55":{}},"parent":{}}],["resolved",{"_index":5,"name":{"4":{}},"parent":{}}],["resolving",{"_index":4,"name":{"3":{}},"parent":{}}],["simplifiedpromisable",{"_index":14,"name":{"13":{},"66":{}},"parent":{}}],["simplifiedpromise",{"_index":12,"name":{"11":{},"64":{}},"parent":{}}],["simplifiedpromiselike",{"_index":13,"name":{"12":{},"65":{}},"parent":{}}],["simplify",{"_index":29,"name":{"29":{}},"parent":{}}],["src/deferral",{"_index":42,"name":{"47":{}},"parent":{"48":{}}}],["src/deferral\".deferral",{"_index":44,"name":{},"parent":{"49":{},"50":{},"51":{},"52":{},"53":{},"54":{},"55":{},"56":{},"57":{},"58":{},"59":{}}}],["src/fun",{"_index":17,"name":{"16":{},"70":{}},"parent":{"17":{},"18":{},"19":{},"20":{},"21":{},"22":{},"23":{},"24":{},"25":{},"26":{},"27":{},"28":{},"29":{},"30":{},"31":{},"32":{},"33":{},"34":{},"35":{},"36":{},"37":{},"38":{},"39":{},"40":{},"41":{},"42":{},"43":{},"44":{},"45":{},"46":{}}}],["src/types",{"_index":0,"name":{"0":{}},"parent":{"1":{},"8":{},"9":{},"10":{},"11":{},"12":{},"13":{},"14":{},"15":{}}}],["src/types\".promisestate",{"_index":3,"name":{},"parent":{"2":{},"3":{},"4":{},"5":{},"6":{},"7":{}}}],["state",{"_index":45,"name":{"50":{}},"parent":{}}],["symbol.tostringtag",{"_index":32,"name":{"33":{}},"parent":{}}],["tap",{"_index":38,"name":{"42":{}},"parent":{}}],["tapcatch",{"_index":39,"name":{"43":{}},"parent":{}}],["tapeach",{"_index":40,"name":{"44":{}},"parent":{}}],["then",{"_index":25,"name":{"24":{}},"parent":{}}],["try",{"_index":28,"name":{"28":{}},"parent":{}}],["unpromise",{"_index":10,"name":{"9":{},"62":{}},"parent":{}}],["wrapped",{"_index":22,"name":{"19":{}},"parent":{}}]],"pipeline":[]}} \ No newline at end of file diff --git a/docs/classes/_src_deferral_.deferral.html b/docs/classes/_src_deferral_.deferral.html deleted file mode 100644 index 97d5227..0000000 --- a/docs/classes/_src_deferral_.deferral.html +++ /dev/null @@ -1,490 +0,0 @@ - - - - - - Deferral | Fun Promises API - - - - - -
-
-
-
- -
-
- Options -
-
- All -
    -
  • Public
  • -
  • Public/Protected
  • -
  • All
  • -
-
- - -
-
- Menu -
-
-
-
-
-
- -

Class Deferral<T>

-
-
-
-
-
-
-
-
-
-

A class that is an "inside-out" FunPromise: the resolve and reject functions - from the callback are exposed as properties, and are therefore able to be called by - caller's code.

-
-

Note that after the first call to either resolve or reject, the underlying promise - is settled. Any subsequent call to either resolve or reject is guaranteed to be - a no-op.

-
-
-
-

Type parameters

-
    -
  • -

    T

    -
  • -
-
-
-

Hierarchy

-
    -
  • - Deferral -
  • -
-
-
-

Index

-
-
-
-

Constructors

- -
-
-

Properties

- -
-
-

Accessors

- -
-
-

Methods

- -
-
-
-
-
-

Constructors

-
- -

constructor

- -
    -
  • - -
    -
    -

    Constructs a new promise and exposes its resolve - and reject functions.

    -
    -
    -

    Returns Deferral

    -
  • -
-
-
-
-

Properties

-
- -

Readonly promise

-
promise: FunPromise<T>
- -
-
-

The promise whose state is determined by resolve and reject.

-
-
-
-
-
-

Accessors

-
- -

isCancelled

-
    -
  • get isCancelled(): boolean
  • -
-
    -
  • - -
    -
    -

    Whether or not the deferral is cancelled.

    -
    -
    -

    Returns boolean

    -
  • -
-
-
- -

isRejected

-
    -
  • get isRejected(): boolean
  • -
-
    -
  • - -
    -
    -

    Whether promise was rejected.

    -
    -
    -

    Returns boolean

    -
  • -
-
-
- -

isResolved

-
    -
  • get isResolved(): boolean
  • -
-
    -
  • - -
    -
    -

    Whether promise has resolved.

    -
    -
    -

    Returns boolean

    -
  • -
-
-
- -

isSettled

-
    -
  • get isSettled(): boolean
  • -
-
    -
  • - -
    -
    -

    Whether promise has resolved or rejected.

    -
    -
    -

    Returns boolean

    -
  • -
-
-
- -

isSettling

-
    -
  • get isSettling(): boolean
  • -
-
    -
  • - -
    -
    -

    Whether promise is in the process of resolving or rejecting.

    -
    -
    -

    Returns boolean

    -
  • -
-
-
- -

state

- - -
-
-
-

Methods

-
- -

cancel

-
    -
  • cancel(): void
  • -
-
    -
  • - -
    -
    -

    Cancels the deferral. If the deferral is not settled, its callbacks will - never be called. If the deferral is settled or cancelled, this is a noop.

    -
    -
    -

    Returns void

    -
  • -
-
-
- -

reject

- -
    -
  • - -
    -
    -

    Rejects promise with the given cause.

    -
    -
    -

    Parameters

    -
      -
    • -
      e: Error
      -
    • -
    -

    Returns FunPromise<T>

    -
  • -
-
-
- -

resolve

- -
    -
  • - -
    -
    -

    Resolves promise with the given value.

    -
    -
    -

    Parameters

    -
      -
    • -
      it: any
      -
    • -
    -

    Returns FunPromise<T>

    -
  • -
-
-
-
- -
-
-
-
-

Legend

-
-
    -
  • Class with type parameter
  • -
  • Constructor
  • -
  • Property
  • -
  • Method
  • -
-
    -
  • Type alias with type parameter
  • -
-
    -
  • Enumeration
  • -
-
-
-
-
-

Generated using TypeDoc

-
-
- - - \ No newline at end of file diff --git a/docs/classes/_src_fun_promise_.funpromise.html b/docs/classes/_src_fun_promise_.funpromise.html deleted file mode 100644 index f53cf3b..0000000 --- a/docs/classes/_src_fun_promise_.funpromise.html +++ /dev/null @@ -1,2380 +0,0 @@ - - - - - - FunPromise | Fun Promises API - - - - - -
-
-
-
- -
-
- Options -
-
- All -
    -
  • Public
  • -
  • Public/Protected
  • -
  • All
  • -
-
- - -
-
- Menu -
-
-
-
-
-
- -

Class FunPromise<T>

-
-
-
-
-
-
-
-
-
-

The class that you should use instead of Promise. It implements the Promise API, so it should be a drop-in replacement.

-
-
-
-
-

Type parameters

-
    -
  • -

    T

    -
  • -
-
-
-

Hierarchy

-
    -
  • - FunPromise -
  • -
-
-
-

Implements

-
    -
  • Promise<T>
  • -
-
-
-

Index

-
-
-
-

Constructors

- -
-
-

Properties

- -
-
-

Accessors

- -
-
-

Methods

- -
-
-
-
-
-

Constructors

-
- -

constructor

-
    -
  • new FunPromise(wrapped: Promise<T>): FunPromise
  • -
-
    -
  • - -
    -
    -

    Constructor, which takes the promise to wrap.

    -
    -
    -

    Parameters

    -
      -
    • -
      wrapped: Promise<T>
      -
    • -
    -

    Returns FunPromise

    -
  • -
-
-
-
-

Properties

-
- -

Protected Readonly wrapped

-
wrapped: Promise<T>
- -
-
-
-

Accessors

-
- -

[Symbol.toStringTag]

-
    -
  • get [Symbol.toStringTag](): string
  • -
-
    -
  • - -
    -
    -

    Required to implement Promise, but you almost certainly don't care about it.

    -
    -

    All the same, it returns the string tag of the underlying promise.

    -
    -

    Returns string

    -
  • -
-
-
-
-

Methods

-
- -

all

- - -
-
- -

arrayify

-
    -
  • arrayify(resolveValues?: boolean, sequentialResolution?: boolean): FunPromise<Item<T>[]>
  • -
-
    -
  • - -
    -
    -

    Coerces the resolve value (which must be an Iterable) into an array. The Iterable requirement - comes from the Item<T> return value: Item<T> is equivalent to never if T is not an Iterable.

    -
    -

    Note that this function does NOT resolve the items within the array unless you pass the first argument - as true. The items are not resolved sequentially unless you also pass a second argument as true.

    -
    -

    Parameters

    -
      -
    • -
      Default value resolveValues: boolean = false
      -
    • -
    • -
      Default value sequentialResolution: boolean = false
      -
    • -
    -

    Returns FunPromise<Item<T>[]>

    -
  • -
-
-
- -

catch

- -
    -
  • - -
    -
    -

    Attaches a callback for only the rejection of the Promise.

    -
    -
    -

    Type parameters

    -
      -
    • -

      TResult = never

      -
    • -
    -

    Parameters

    -
      -
    • -
      Default value onrejected: (reason: any) => Promisable<TResult> = _identity
      -
      -

      The callback to execute when the Promise is rejected.

      -
      -
        -
      • - -
          -
        • -

          Parameters

          -
            -
          • -
            reason: any
            -
          • -
          -

          Returns Promisable<TResult>

          -
        • -
        -
      • -
      -
    • -
    -

    Returns FunPromise<T | TResult>

    -

    A Promise for the completion of the callback.

    -
  • -
-
-
- -

delay

- -
    -
  • - -
    -
    -

    Waits for waitTimeMs milliseconds before resolving. If returnValue is provided, resolves with the provided value.

    -
    -

    If waitTimeMs is less than or equal to zero, then it simply defers until the call stack is clear.

    -
    -

    Type parameters

    -
      -
    • -

      T = void

      -
    • -
    -

    Parameters

    -
      -
    • -
      waitTimeMs: number
      -
    • -
    • -
      Optional returnValue: Promisable<T>
      -
    • -
    -

    Returns FunPromise<T>

    -
  • -
-
-
- -

filter

- -
    -
  • - -
    -
    -

    Given a filtering function, apply the filtering function to each element of the promise's resolved value, - and return an array with the values for which the filtering function returns true. If any of the filtering - results are rejected, the entire operation will be rejected.

    -
    -

    The order of the elements in the result are stable with regard to the order of the elements in the promise's - resolved value. That is, if X < Y and input[X] and input[Y] are both in the input, and input[X] and - input[Y] both pass the filtering function, then the output index of input[X] will be less than the output - index of input[Y]. However, the resolution order is not guaranteed: that is, input[Y] may be resolved and - tested before input[X] even though input[X] has a lower output index than input[Y].

    -
    -

    Parameters

    - -

    Returns FunPromise<Item<T>[]>

    -
  • -
-
-
- -

finally

- - -
-
- -

flatMap

- -
    -
  • - -
    -
    -

    Given a mapping function, apply the mapping function to each element of the promise's resolved value, - and return an array with the concatenated results of the mapping. If any of the mapping results are - rejected, the entire operation will be rejected.

    -
    -

    The order of the elements in the result correspond to the order of the elements in the promise's - resolved value. However, the resolution order is not guaranteed.

    -
    -

    Type parameters

    -
      -
    • -

      T2 = Item<T>

      -
    • -
    -

    Parameters

    - -

    Returns FunPromise<T2[]>

    -
  • -
-
-
- -

fold

- -
    -
  • - -
    -
    -

    Given an initial value and an accumulator function, apply the accumlator function to each element of the promise's resolved value, - passing in the current value and the result. Returns an array with the result of the accumulation. If any of the promise's values are - rejected, the entire operation will be rejected.

    -
    -

    The resolution order is not guaranteed. The accumulator function will be passed values as those values resolve.

    -
    -

    Type parameters

    -
      -
    • -

      T2 = Item<T>

      -
    • -
    -

    Parameters

    -
      -
    • -
      initialValue: T2
      -
    • -
    • -
      accumulator: (memo: T2, it: Item<T>) => Promisable<T2>
      - -
    • -
    -

    Returns FunPromise<T2>

    -
  • -
-
-
- -

map

- -
    -
  • - -
    -
    -

    Given a mapping function, apply the mapping function to each element of the promise's resolved value, - and return an array with the results of the mapping. If any of the mapping results are rejected, - the entire operation will be rejected.

    -
    -

    The order of the elements in the result correspond to the order of the elements in the promise's - resolved value. However, the resolution order is not guaranteed. For example, although the - output at index 0 will hold the mapping of the input element at index 0, it is not guaranteed that - the mapping of index 0 will be awaited before the mapping of index 1.

    -
    -

    Type parameters

    -
      -
    • -

      T2 = Item<T>

      -
    • -
    -

    Parameters

    - -

    Returns FunPromise<T2[]>

    -
  • -
-
-
- -

reject

- -
    -
  • - -
    -
    -

    Takes a value (or a promise of a value) and returns a promise rejecting - with that value, after unwrapping as many layers of PromiseLike - wrappers as necessary. This disregards any existing status.

    -
    -
    -

    Parameters

    -
      -
    • -
      Optional value: unknown
      -
    • -
    -

    Returns FunPromise<never>

    -
  • -
-
-
- -

resolve

- -
    -
  • - -
    -
    -

    Takes a value (or a promise of a value) and resolves to the new value, - disregarding any previous resolution value.

    -
    -
    -

    Type parameters

    -
      -
    • -

      T2 = void

      -
    • -
    -

    Parameters

    - -

    Returns FunPromise<T2>

    -
  • -
-
-
- -

simplify

- -
    -
  • - -
    -
    -

    Unwraps layers of PromiseLike wrappers as necessary.

    -
    -

    This behavior is actually part of the Promise/A+ spec, but the type system struggles with that fact, - so this method is a workaround.

    -

    In a future version of this library, FunPromise will extend Promise<Unpromise<T>> instead of - just Promise<T>, which will render this method irrelevant. Unfortunately, Typescript's type system - doesn't seem capable of handling that reality quite yet, so this is what we get.

    -
    -

    Returns FunPromise<Unpromise<T>>

    -
  • -
-
-
- -

tap

- -
    -
  • - -
    -
    -

    Access the resolved value without changing it. Note that if the callback rejects (ie: throws), - then the resulting promise will be rejected.

    -
    -
    -

    Parameters

    -
      -
    • -
      callback: (val: T) => Promisable<void>
      -
        -
      • - -
          -
        • -

          Parameters

          -
            -
          • -
            val: T
            -
          • -
          -

          Returns Promisable<void>

          -
        • -
        -
      • -
      -
    • -
    -

    Returns FunPromise<T>

    -
  • -
-
-
- -

tapCatch

- -
    -
  • - -
    -
    -

    Access the rejection reason without changing it. Note that if the callback itself rejects (ie: throws), - both rejection reasons will be capture in a single [[NestedError]].

    -
    -
    -

    Parameters

    -
      -
    • -
      callback: (reason: unknown) => Promisable<void>
      -
        -
      • - -
          -
        • -

          Parameters

          -
            -
          • -
            reason: unknown
            -
          • -
          -

          Returns Promisable<void>

          -
        • -
        -
      • -
      -
    • -
    -

    Returns FunPromise<T>

    -
  • -
-
-
- -

tapEach

- -
    -
  • - -
    -
    -

    Access each of the resolved values of a resolved iterable without changing it. Note that if the callback rejects (ie: throws), - then the resulting promise will be rejected.

    -
    -
    -

    Parameters

    - -

    Returns FunPromise<Item<T>[]>

    -
  • -
-
-
- -

then

-
    -
  • then<TResult1>(onfulfilled: (value: T) => Promisable<TResult1>): FunPromise<TResult1>
  • -
  • then<TResult1, TResult2>(onfulfilled: (value: T) => Promisable<TResult1>, onrejected: (reason: any) => Promisable<TResult2>): FunPromise<TResult1 | TResult2>
  • -
-
    -
  • - -
    -
    -

    Attaches callbacks for the resolution and/or rejection of the Promise.

    -
    -
    -

    Type parameters

    -
      -
    • -

      TResult1 = T

      -
    • -
    -

    Parameters

    -
      -
    • -
      onfulfilled: (value: T) => Promisable<TResult1>
      -
      -

      The optional callback to execute when the Promise is resolved.

      -
      -
        -
      • - -
          -
        • -

          Parameters

          -
            -
          • -
            value: T
            -
          • -
          -

          Returns Promisable<TResult1>

          -
        • -
        -
      • -
      -
    • -
    -

    Returns FunPromise<TResult1>

    -

    A Promise for the completion of which ever callback is executed.

    -
  • -
  • - -

    Type parameters

    -
      -
    • -

      TResult1 = T

      -
    • -
    • -

      TResult2 = TResult1

      -
    • -
    -

    Parameters

    -
      -
    • -
      onfulfilled: (value: T) => Promisable<TResult1>
      -
        -
      • - -
          -
        • -

          Parameters

          -
            -
          • -
            value: T
            -
          • -
          -

          Returns Promisable<TResult1>

          -
        • -
        -
      • -
      -
    • -
    • -
      onrejected: (reason: any) => Promisable<TResult2>
      -
        -
      • - -
          -
        • -

          Parameters

          -
            -
          • -
            reason: any
            -
          • -
          -

          Returns Promisable<TResult2>

          -
        • -
        -
      • -
      -
    • -
    -

    Returns FunPromise<TResult1 | TResult2>

    -
  • -
-
-
- -

Static all

- - -
-
- -

Static coalesce

- -
    -
  • - -
    -
    -

    Given a PromisableIterable whose values are nullary functions returning Promisable<T>, - this executes all the functions simultaneously and returns the first whose return value passes the provided test. - The default test returns true if the value is not null or undefined.

    -
    -

    If no function resolves successfully, the last seen rejection is thrown. If some functions resolve but some reject, - and none of the resolved values pass the test, then the last seen rejection is thrown.

    -

    If all the functions resolve but to a value but no value passes the test, then this rejects with an error saying as much.

    -
    -

    Type parameters

    -
      -
    • -

      T

      -
    • -
    -

    Parameters

    - -

    Returns FunPromise<T>

    -
  • -
-
-
- -

Static delay

- -
    -
  • - -
    -
    -

    Waits for waitTimeMs milliseconds before resolving. If returnValue is provided, resolves with the provided value.

    -
    -

    If waitTimeMs is less than or equal to zero, then it simply defers until the call stack is clear.

    -
    -

    Parameters

    -
      -
    • -
      waitTimeMs: number
      -
    • -
    -

    Returns FunPromise<void>

    -
  • -
  • - -

    Type parameters

    -
      -
    • -

      T

      -
    • -
    -

    Parameters

    -
      -
    • -
      waitTimeMs: number
      -
    • -
    • -
      returnValue: Promisable<T>
      -
    • -
    -

    Returns FunPromise<T>

    -
  • -
-
-
- -

Static filter

- - -
-
- -

Static flatMap

- - -
-
- -

Static fold

- -
    -
  • - -
    -
    -

    Equivalent to FunPromise.resolve(values).fold(initialValue, accumulator).

    -
    -
    -

    Type parameters

    -
      -
    • -

      T

      -
    • -
    • -

      T2 = T

      -
    • -
    -

    Parameters

    -
      -
    • -
      values: PromisableIterable<T>
      -
    • -
    • -
      initialValue: T2
      -
    • -
    • -
      accumulator: (memo: T2, it: T) => Promisable<T2>
      -
        -
      • - -
          -
        • -

          Parameters

          -
            -
          • -
            memo: T2
            -
          • -
          • -
            it: T
            -
          • -
          -

          Returns Promisable<T2>

          -
        • -
        -
      • -
      -
    • -
    -

    Returns FunPromise<T2>

    -
  • -
-
-
- -

Static map

- - -
-
- -

Static reject

- -
    -
  • - -
    -
    -

    Takes a value (or a promise of a value) and returns a promise rejecting - with that value, after unwrapping as many layers of PromiseLike - wrappers as necessary.

    -
    -
    -

    Parameters

    -
      -
    • -
      Optional value: unknown
      -
    • -
    -

    Returns FunPromise<never>

    -
  • -
-
-
- -

Static resolve

- -
    -
  • - -
    -
    -

    Takes a value (or a promise of a value) and returns a promise wrapping - it.

    -
    -
    -

    Type parameters

    -
      -
    • -

      T = void

      -
    • -
    -

    Parameters

    - -

    Returns FunPromise<T>

    -
  • -
-
-
- -

Static try

- - -
-
-
- -
-
-
-
-

Legend

-
-
    -
  • Class with type parameter
  • -
  • Constructor
  • -
  • Method
  • -
-
    -
  • Type alias with type parameter
  • -
-
    -
  • Enumeration
  • -
-
    -
  • Protected property
  • -
-
    -
  • Static method
  • -
-
-
-
-
-

Generated using TypeDoc

-
-
- - - \ No newline at end of file diff --git a/docs/coverage.txt b/docs/coverage.txt deleted file mode 100644 index 608cbe6..0000000 --- a/docs/coverage.txt +++ /dev/null @@ -1,43 +0,0 @@ -Explicitly Supported Browsers (MUST support Promises) -and_chr 87 -and_ff 83 -and_qq 10.4 -and_uc 12.12 -android 81 -baidu 7.12 -chrome 87 -chrome 86 -chrome 85 -chrome 84 -chrome 83 -chrome 80 -chrome 49 -edge 87 -edge 86 -edge 18 -firefox 83 -firefox 82 -firefox 81 -firefox 78 -ios_saf 14.0-14.2 -ios_saf 13.4-13.7 -ios_saf 13.3 -ios_saf 12.2-12.4 -ios_saf 12.0-12.1 -ios_saf 11.3-11.4 -ios_saf 10.3 -ios_saf 9.3 -kaios 2.5 -op_mob 59 -opera 72 -opera 71 -safari 14 -safari 13.1 -safari 13 -safari 12.1 -samsung 13.0 -samsung 12.0 -samsung 11.1-11.2 -These browsers account for 92.34% of all users globally -These browsers account for 92.77% of all users in the US -Note that functionally equivalent but unlisted browsers do not count in these stats, so real coverage is much higher than the percentages reported. diff --git a/docs/enums/_src_types_.promisestate.html b/docs/enums/_src_types_.promisestate.html deleted file mode 100644 index 6b08097..0000000 --- a/docs/enums/_src_types_.promisestate.html +++ /dev/null @@ -1,288 +0,0 @@ - - - - - - PromiseState | Fun Promises API - - - - - -
-
-
-
- -
-
- Options -
-
- All -
    -
  • Public
  • -
  • Public/Protected
  • -
  • All
  • -
-
- - -
-
- Menu -
-
-
-
-
-
- -

Enumeration PromiseState

-
-
-
-
-
-
-
-
-
-

The various states that a promise can be in.

-
-
-
-
-

Index

-
-
-
-

Enumeration members

- -
-
-
-
-
-

Enumeration members

-
- -

Cancelled

-
Cancelled: = "cancelled"
- -
-
-

The promise has been cancelled, which will prevent its - callbacks from firing.

-
-
-
-
- -

Pending

-
Pending: = "pending"
- -
-
-

The promise is neither resolved nor rejected.

-
-
-
-
- -

Rejected

-
Rejected: = "rejected"
- -
-
-

The promise has rejected with a cause.

-
-
-
-
- -

Rejecting

-
Rejecting: = "rejecting"
- -
-
-

The promise has begun rejecting, but is not yet fully rejected.

-
-
-
-
- -

Resolved

-
Resolved: = "resolved"
- -
-
-

The promise has resolved to a value.

-
-
-
-
- -

Resolving

-
Resolving: = "resolving"
- -
-
-

The promise has begun resolving, but is not yet fully resolved.

-
-
-
-
-
- -
-
-
-
-

Legend

-
-
    -
  • Type alias with type parameter
  • -
-
    -
  • Enumeration
  • -
-
    -
  • Class with type parameter
  • -
-
-
-
-
-

Generated using TypeDoc

-
-
- - - \ No newline at end of file diff --git a/docs/globals.html b/docs/globals.html deleted file mode 100644 index 481bf90..0000000 --- a/docs/globals.html +++ /dev/null @@ -1,129 +0,0 @@ - - - - - - Fun Promises API - - - - - -
-
-
-
- -
-
- Options -
-
- All -
    -
  • Public
  • -
  • Public/Protected
  • -
  • All
  • -
-
- - -
-
- Menu -
-
-
-
-
-
- -

Fun Promises API

-
-
-
-
-
-
-
-

Index

-
- -
-
-
- -
-
-
-
-

Legend

-
-
    -
  • Type alias with type parameter
  • -
-
    -
  • Enumeration
  • -
-
    -
  • Class with type parameter
  • -
-
-
-
-
-

Generated using TypeDoc

-
-
- - - \ No newline at end of file diff --git a/docs/index.html b/docs/index.html deleted file mode 100644 index b4faa92..0000000 --- a/docs/index.html +++ /dev/null @@ -1,271 +0,0 @@ - - - - - - Fun Promises API - - - - - -
-
-
-
- -
-
- Options -
-
- All -
    -
  • Public
  • -
  • Public/Protected
  • -
  • All
  • -
-
- - -
-
- Menu -
-
-
-
-
-
- -

Fun Promises API

-
-
-
-
-
-
-
- - -

fun-promises

-
- -

A library for making Promises more friendly, fluent, and fun(ctional).

-
- -

What This Is Not

-
-

This is not an implementation of Promises/A+. It - is not a polyfill or a ponyfill. In - fact, it assumes that you have Promise available as a global, either through a - polyfill or natively.

- -

What This Is

-
-

This is a library that extends the native Promise implementation with a number - of useful utilities, so that your code is faster and easier. It is inspired by - libraries like bluebird and - rsvp.js, except - without the overhead of providing its own Promise implementation. Native - promises have been competitive in performance since Node 10 - (even bluebird says so) but - there's a lot of functionality which native Promises don't supply. Fun - Promises gives you that better API without the overhead.

- -

API

-
- -

You also may want to check out - the BDD spec, - which gives an overview of how we expect these things to work.

- -

Some Highlights

-
- -

Deferral class

-
-

This is an inside-out promise: it gives you access to the resolve and reject - methods of the promise so that you can perform operations on them later, as well - as having accessor to query the state of promise.

- -

try

-
-
FunPromise.try(() => doSomething(explosivelyFailingParamCalculation()));
-FunPromise.try(async () => {
-    /* do stuff */ await something; /* do more stuff */
-});
-

Wrap your execution in a promise, so that even its invocation - won't release Zalgo, - or as a convinent way to build a FunPromise off of an async function.

- -

tap

-
-
someExpensiveOperation()
-    .tap((value) => debug("Value from someExpensiveOperation", value))
-    .then(/* ... */);
-

This lets you take a look at a resolved value without risking changing it. This - is extremely useful for debugging log messages.

- -

race

-
-
getRelatedShows().race((someShow) => renderSuggestedShow(someShow));
-

Fire off a bunch of promises and return whichever one resolves first. (The - results of any later-resolving promises are discarded.)

- -

coalesce

-
-
FunPromise.coalesce([
-    lookupUserInMemoryCache,
-    lookupUserInRedisCache,
-    lookupUserInDB,
-]).then((data) => renderUserData(data));
-

Given a bunch of functions that return either values or promises of values, - execute them sequentially and return the first one what resolves.

- -

Types

-
-

There are types that represent unwrapped promise values - (Unpromise), - things that may be promises or values - (Promisable), - and - a few others that are a lot more esoteric.

-

NOTE: Compiling these types requires a recent version of TypeScript (4.1 or - greater) due to conditional recursive types being unavailable in 3.x and buggy - in 4.0.x.

- -

Distributions

-
-

By default, your packager should automatically grab the appropriate distribution - through the package.json configuration within this library. If you're curious - or if you have a weird use case, then each distribution has a few different - flavors of the codebase to choose from. These all live under the ./dist - directory.

- -

ESNext

-
-

Within ./dist/esnext is the result of the Typescript compilation with the - "ESNext" module setting and - the "ESNext" target setting. - Note that it is subject to change as new ECMAScript standards are put out and - Typescript's JavaScript generation continues to catch up to them, and mostly - exists for developers to see code that results from compilation.

- -

ES6

-
-

Within ./dist/es6 are the folders amd, umd, cjs (CommonJS), and esm - (ECMAScript Modules). These contain the result of the Typescript compilation - with the corresponding - module setting and the - "ES6" target setting.

-

The only single-file distribution is the es6/amd distribution.

- -

Node

-
-

Within ./dist/node are the folders v10, v12, v14, each of which - containing the Typescript compilation based on - the recommended tsconfig.json configs. - for those environments. All the versions are the exact same code as of this - writing, so we default Node to using node/v14.

- -

Browser

-
-

The file at ./dist/browser/index.js is the result of transpiling the result of - the ESNext code above using Parcel. The result is a - single minified file, appropriate for use in a CDN. It exposes the module under - the global FunPromise namespace.

- -

React Native

-
-

Within ./dist/react-native is the result of transpiling the result with - the recommended tsconfig.json configs - for React Native. The distribution is specified in package.json under the - "reactNative" key, - which you can configure Metro to prefer.

- -

Documentation

-
-

The full documentation (including this content) is available on - GitHub Pages.

- -

Specifications

-
-

Our test specs are - published here.

- -

Contributing [ TODO ]

-
- -

Design Philosophy [ TODO ]

-
-
-
- -
-
-
-
-

Legend

-
-
    -
  • Type alias with type parameter
  • -
-
    -
  • Enumeration
  • -
-
    -
  • Class with type parameter
  • -
-
-
-
-
-

Generated using TypeDoc

-
-
- - - \ No newline at end of file diff --git a/docs/modules/_index_.html b/docs/modules/_index_.html deleted file mode 100644 index 5f341b5..0000000 --- a/docs/modules/_index_.html +++ /dev/null @@ -1,218 +0,0 @@ - - - - - - "index" | Fun Promises API - - - - - -
-
-
-
- -
-
- Options -
-
- All -
    -
  • Public
  • -
  • Public/Protected
  • -
  • All
  • -
-
- - -
-
- Menu -
-
-
-
-
-
- -

Module "index"

-
-
-
-
-
-
-
-
-
-

Re-exports everything from [src/types|src_types_.html], [src/fun-promise|_src_fun-promise.html], and [src/deferral|_src_deferral_.html].

-
-
-
-
-

Index

-
- -
-
-
-

References

-
- -

Item

- Re-exports Item -
-
- -

IterableOfPromisables

- Re-exports IterableOfPromisables -
-
- -

Promisable

- Re-exports Promisable -
-
- -

PromisableIterable

- Re-exports PromisableIterable -
-
- -

PromiseState

- Re-exports PromiseState -
-
- -

SimplifiedPromisable

- Re-exports SimplifiedPromisable -
-
- -

SimplifiedPromise

- Re-exports SimplifiedPromise -
-
- -

SimplifiedPromiseLike

- Re-exports SimplifiedPromiseLike -
-
- -

Unpromise

- Re-exports Unpromise -
-
-
- -
-
-
-
-

Legend

-
-
    -
  • Type alias with type parameter
  • -
-
    -
  • Enumeration
  • -
-
    -
  • Class with type parameter
  • -
-
-
-
-
-

Generated using TypeDoc

-
-
- - - \ No newline at end of file diff --git a/docs/modules/_src_deferral_.html b/docs/modules/_src_deferral_.html deleted file mode 100644 index 952a565..0000000 --- a/docs/modules/_src_deferral_.html +++ /dev/null @@ -1,131 +0,0 @@ - - - - - - "src/deferral" | Fun Promises API - - - - - -
-
-
-
- -
-
- Options -
-
- All -
    -
  • Public
  • -
  • Public/Protected
  • -
  • All
  • -
-
- - -
-
- Menu -
-
-
-
-
-
- -

Module "src/deferral"

-
-
-
-
-
-
-
-

Index

-
-
-
-

Classes

- -
-
-
-
-
- -
-
-
-
-

Legend

-
-
    -
  • Type alias with type parameter
  • -
-
    -
  • Enumeration
  • -
-
    -
  • Class with type parameter
  • -
-
-
-
-
-

Generated using TypeDoc

-
-
- - - \ No newline at end of file diff --git a/docs/modules/_src_fun_promise_.html b/docs/modules/_src_fun_promise_.html deleted file mode 100644 index 59c2cac..0000000 --- a/docs/modules/_src_fun_promise_.html +++ /dev/null @@ -1,131 +0,0 @@ - - - - - - "src/fun-promise" | Fun Promises API - - - - - -
-
-
-
- -
-
- Options -
-
- All -
    -
  • Public
  • -
  • Public/Protected
  • -
  • All
  • -
-
- - -
-
- Menu -
-
-
-
-
-
- -

Module "src/fun-promise"

-
-
-
-
-
-
-
-

Index

-
-
-
-

Classes

- -
-
-
-
-
- -
-
-
-
-

Legend

-
-
    -
  • Type alias with type parameter
  • -
-
    -
  • Enumeration
  • -
-
    -
  • Class with type parameter
  • -
-
-
-
-
-

Generated using TypeDoc

-
-
- - - \ No newline at end of file diff --git a/docs/modules/_src_fun_promise_test_.html b/docs/modules/_src_fun_promise_test_.html deleted file mode 100644 index dcc855c..0000000 --- a/docs/modules/_src_fun_promise_test_.html +++ /dev/null @@ -1,103 +0,0 @@ - - - - - - "src/fun-promise.test" | Fun Promises API - - - - - -
-
-
-
- -
-
- Options -
-
- All -
    -
  • Public
  • -
  • Public/Protected
  • -
  • All
  • -
-
- - -
-
- Menu -
-
-
-
-
-
- -

Module "src/fun-promise.test"

-
-
-
-
-
-
-
- -
-
-
-
-

Legend

-
-
    -
  • Type alias with type parameter
  • -
-
    -
  • Enumeration
  • -
-
    -
  • Class with type parameter
  • -
-
-
-
-
-

Generated using TypeDoc

-
-
- - - \ No newline at end of file diff --git a/docs/modules/_src_types_.html b/docs/modules/_src_types_.html deleted file mode 100644 index c59f1cc..0000000 --- a/docs/modules/_src_types_.html +++ /dev/null @@ -1,352 +0,0 @@ - - - - - - "src/types" | Fun Promises API - - - - - -
-
-
-
- -
-
- Options -
-
- All -
    -
  • Public
  • -
  • Public/Protected
  • -
  • All
  • -
-
- - -
-
- Menu -
-
-
-
-
-
- -

Module "src/types"

-
-
-
-
-
-
-
-
-
-
format
-

These are where we put all the type aliases, interfaces, and enumerations that are shared - between multiple things, or may be useful to use without us.

-
-
-
-
-
-

Index

-
- -
-
-
-

Type aliases

-
- -

Item

-
Item<T>: Unpromise<T> extends Array<infer U> ? U : Unpromise<T> extends Iterable<infer U> ? U : never
- -
-
-

Provides the type of elements within an Iterable, which may be wrapped in one or more promises. - The element type is also unwrapped any promises.

-
-
-

Type parameters

-
    -
  • -

    T

    -
  • -
-
-
- -

IterableOfPromisables

-
IterableOfPromisables<T>: Iterable<Promisable<T>>
- -
-
-

Represents an Iterable that is not a promise but an actual value that is an Iterable, - although it may produce either values or promises of values or both.

-
-
-

Type parameters

-
    -
  • -

    T

    -
  • -
-
-
- -

Promisable

-
Promisable<T>: T | PromiseLike<T>
- -
-
-

Something which can be resolved: that is, either a value or a promise of a value.

-
-
-

Type parameters

-
    -
  • -

    T

    -
  • -
-
-
- -

PromisableIterable

-
PromisableIterable<T>: Promisable<IterableOfPromisables<T>>
- -
-
-

An Iterable or a promise of an Iterable. Its elements are any mix of type T and/or PromiseLike<T>. - Used as a type for arguments.

-
-
-

Type parameters

-
    -
  • -

    T

    -
  • -
-
-
- -

SimplifiedPromisable

-
SimplifiedPromisable<T>: Promisable<Unpromise<T>>
- -
-
-

Guarantees that there is at most one PromiseLike wrapper.

-
-
-

Type parameters

-
    -
  • -

    T

    -
  • -
-
-
- -

SimplifiedPromise

-
SimplifiedPromise<T>: Promise<Unpromise<T>>
- -
-
-

Guarantees that there is only one Promise wrapper.

-
-
-

Type parameters

-
    -
  • -

    T

    -
  • -
-
-
- -

SimplifiedPromiseLike

-
SimplifiedPromiseLike<T>: PromiseLike<Unpromise<T>>
- -
-
-

Guarantees that there is only one PromiseLike wrapper.

-
-
-

Type parameters

-
    -
  • -

    T

    -
  • -
-
-
- -

Unpromise

-
Unpromise<T>: T extends PromiseLike<infer U> ? Unpromise<U> : T extends Promisable<infer U> ? U extends T ? T : Unpromise<U> : T
- -
-
-

Provides the type of the resolution value after unwrapping all the PromiseLike and Promisable interfaces (if any).

-
-
-

Type parameters

-
    -
  • -

    T

    -
  • -
-
-
-
- -
-
-
-
-

Legend

-
-
    -
  • Type alias with type parameter
  • -
-
    -
  • Enumeration
  • -
-
    -
  • Class with type parameter
  • -
-
-
-
-
-

Generated using TypeDoc

-
-
- - - \ No newline at end of file diff --git a/docs/test-results.txt b/docs/test-results.txt deleted file mode 100644 index f95ac68..0000000 --- a/docs/test-results.txt +++ /dev/null @@ -1,177 +0,0 @@ -$ jest --detectOpenHandles --forceExit ./*.test.js ./src/*.test.js --verbose -PASS src/fun-promise.test.js (7.113 s) - FunPromise - ✓ can be constructed and resolved (3 ms) - resolve - static - resolves correctly - ✓ with a value (10 ms) - ✓ without a value (1 ms) - ✓ rejects when provided a rejection (1 ms) - instance - resolves correctly - ✓ with a value (1 ms) - ✓ without a value (1 ms) - ✓ rejects when provided a rejection - then - ✓ works without onrejected - catch - ✓ handles rejections (2 ms) - ✓ returns the error when not passed an argument (1 ms) - arrayify - ✓ basically works (2 ms) - ✓ returns a clone (1 ms) - ✓ does not resolve values when called without an argument (2 ms) - ✓ resolves values when called with the sole argument `true` (1 ms) - ✓ rejects values when called with the sole argument `true` and a rejection in the mix (1 ms) - ✓ rejects values in order when called with the arguments `(true, true)` (1 ms) - ✓ resolves values in order when called with the arguments `(true, true)` (3 ms) - all - static - basically works - ✓ for 0 arguments (1 ms) - ✓ for 1 arguments - ✓ for 2 arguments (1 ms) - ✓ for 3 arguments (1 ms) - ✓ for 4 arguments (2 ms) - ✓ for 5 arguments (1 ms) - ✓ for 6 arguments - ✓ for 7 arguments (1 ms) - ✓ for 8 arguments - ✓ for 9 arguments (1 ms) - instance - basically works - ✓ for 0 arguments (1 ms) - ✓ for 1 arguments (9 ms) - ✓ for 2 arguments (1 ms) - ✓ for 3 arguments (1 ms) - ✓ for 4 arguments (1 ms) - ✓ for 5 arguments (1 ms) - ✓ for 6 arguments (1 ms) - ✓ for 7 arguments - ✓ for 8 arguments (1 ms) - ✓ for 9 arguments (1 ms) - try - ✓ basically works (1 ms) - ✓ works with one argument (1 ms) - ✓ explodes properly - map - static - ✓ basically works (1 ms) - ✓ works with some test values (1 ms) - instance - ✓ basically works (1 ms) - ✓ works with some test values (1 ms) - Symbol.toStringTag - ✓ is the same as the promise passed in (1 ms) - finally - ✓ returns the same promise when given no arguments (1 ms) - ✓ executes on resolution - ✓ executes on rejection (1 ms) - reject - static - ✓ rejects correctly - ✓ doesn't change the object that is rejected (1 ms) - instance - ✓ rejects correctly (1 ms) - ✓ doesn't change the object that is rejected - coalesce - ✓ basically works (1 ms) - ✓ returns the first resolving value (1011 ms) - ✓ returns the value that passes the test (2 ms) - ✓ throws the error if nothing passes the test (2 ms) - ✓ punts appropriately after the first resolution (1 ms) - delay - static - When requesting a delay of -1000 milliseconds - basically works - ✓ with no arg (1 ms) - ✓ with one arg (2 ms) - When requesting a delay of -1 milliseconds - basically works - ✓ with no arg (1 ms) - ✓ with one arg (6 ms) - When requesting a delay of 0 milliseconds - basically works - ✓ with no arg - ✓ with one arg (2 ms) - When requesting a delay of 1 milliseconds - basically works - ✓ with no arg (1 ms) - ✓ with one arg (1 ms) - When requesting a delay of 1000 milliseconds - basically works - ✓ with no arg (1 ms) - ✓ with one arg (1000 ms) - instance - When requesting a delay of -1000 milliseconds - basically works - ✓ with no arg (1 ms) - ✓ with one arg (2 ms) - When requesting a delay of -1 milliseconds - basically works - ✓ with no arg (1 ms) - ✓ with one arg (2 ms) - When requesting a delay of 0 milliseconds - basically works - ✓ with no arg (1 ms) - ✓ with one arg (2 ms) - When requesting a delay of 1 milliseconds - basically works - ✓ with no arg (1 ms) - ✓ with one arg (1 ms) - When requesting a delay of 1000 milliseconds - basically works - ✓ with no arg (1 ms) - ✓ with one arg (1000 ms) - simplify - ✓ basically works (2 ms) - filter - static - ✓ basically works (3 ms) - instance - ✓ basically works (2 ms) - flatMap - static - ✓ basically works (1 ms) - instance - ✓ basically works (1 ms) - tap - ✓ basically works (1 ms) - ✓ rejects if it throws an exception (1 ms) - fold - static - ✓ basically works (1 ms) - instance - ✓ basically works - tapCatch - ✓ basically works (1 ms) - ✓ nests explosions (3 ms) - tapEach - ✓ basically works (1 ms) - -PASS ./assumptions.test.js - lodash - castArray - ✓ DOES NOT turn iterables into arrays (2 ms) - toArray - ✓ does turn iterables into arrays (1 ms) - -----------------|---------|----------|---------|---------|------------------- -File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s -----------------|---------|----------|---------|---------|------------------- -All files | 100 | 100 | 100 | 100 | - fun-promise.ts | 100 | 100 | 100 | 100 | -----------------|---------|----------|---------|---------|------------------- - -=============================== Coverage summary =============================== -Statements : 100% ( 117/117 ) -Branches : 100% ( 24/24 ) -Functions : 100% ( 66/66 ) -Lines : 100% ( 98/98 ) -================================================================================ -Test Suites: 2 passed, 2 total -Tests: 91 passed, 91 total -Snapshots: 0 total -Time: 7.424 s -Ran all test suites matching /.\/assumptions.test.js|.\/src\/fun-promise.test.js/i.