Skip to content
Snippets Groups Projects
Commit 4e5a6480 authored by Asbjørn Fiksdal Kallestad's avatar Asbjørn Fiksdal Kallestad
Browse files

SlackTest

parent 19f9300b
No related branches found
No related tags found
No related merge requests found
Pipeline #49645 failed
Showing
with 6399 additions and 0 deletions
...@@ -84,6 +84,7 @@ test("Update a row", done => { ...@@ -84,6 +84,7 @@ test("Update a row", done => {
"Test callback: status=" + status + ", data=" + JSON.stringify(data) "Test callback: status=" + status + ", data=" + JSON.stringify(data)
); );
expect(data.affectedRows).toBeGreaterThanOrEqual(1); expect(data.affectedRows).toBeGreaterThanOrEqual(1);
expect(data[0].navn.toBe(1))
done(); done();
} }
personDao.updateOne( personDao.updateOne(
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
(function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t.RSVP=t.RSVP||{})})(this,function(t){"use strict";function e(t,e){for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}function r(t){var e=t._promiseCallbacks;e||(e=t._promiseCallbacks={});return e}function n(t,e){if(2!==arguments.length)return jt[t];jt[t]=e}function o(t){var e=typeof t;return null!==t&&("object"===e||"function"===e)}function i(t){return"function"==typeof t}function u(t){return null!==t&&"object"==typeof t}function a(t){return null!==t&&"object"==typeof t}function s(){setTimeout(function(){for(var t=0;t<St.length;t++){var e=St[t],r=e.payload;r.guid=r.key+r.id;r.childGuid=r.key+r.childId;r.error&&(r.stack=r.error.stack);jt.trigger(e.name,e.payload)}St.length=0},50)}function c(t,e,r){1===St.push({name:t,payload:{key:e._guidKey,id:e._id,eventName:t,detail:e._result,childId:r&&r._id,label:e._label,timeStamp:Ot(),error:jt["instrument-with-stack"]?new Error(e._label):null}})&&s()}function f(t,e){var r=this;if(t&&"object"==typeof t&&t.constructor===r)return t;var n=new r(h,e);m(n,t);return n}function l(){return new TypeError("A promises callback cannot return that same promise.")}function h(){}function p(t){try{return t.then}catch(e){kt.error=e;return kt}}function y(t,e,r,n){try{t.call(e,r,n)}catch(o){return o}}function v(t,e,r){jt.async(function(t){var n=!1,o=y(r,e,function(r){if(!n){n=!0;e!==r?m(t,r,void 0):b(t,r)}},function(e){if(!n){n=!0;g(t,e)}},"Settle: "+(t._label||" unknown promise"));if(!n&&o){n=!0;g(t,o)}},t)}function d(t,e){if(e._state===Pt)b(t,e._result);else if(e._state===Rt){e._onError=null;g(t,e._result)}else j(e,void 0,function(r){e!==r?m(t,r,void 0):b(t,r)},function(e){return g(t,e)})}function _(t,e,r){var n=e.constructor===t.constructor&&r===P&&t.constructor.resolve===f;if(n)d(t,e);else if(r===kt){g(t,kt.error);kt.error=null}else i(r)?v(t,e,r):b(t,e)}function m(t,e){t===e?b(t,e):o(e)?_(t,e,p(e)):b(t,e)}function w(t){t._onError&&t._onError(t._result);E(t)}function b(t,e){if(t._state===At){t._result=e;t._state=Pt;0===t._subscribers.length?jt.instrument&&c("fulfilled",t):jt.async(E,t)}}function g(t,e){if(t._state===At){t._state=Rt;t._result=e;jt.async(w,t)}}function j(t,e,r,n){var o=t._subscribers,i=o.length;t._onError=null;o[i]=e;o[i+Pt]=r;o[i+Rt]=n;0===i&&t._state&&jt.async(E,t)}function E(t){var e=t._subscribers,r=t._state;jt.instrument&&c(r===Pt?"fulfilled":"rejected",t);if(0!==e.length){for(var n=void 0,o=void 0,i=t._result,u=0;u<e.length;u+=3){n=e[u];o=e[u+r];n?S(r,n,o,i):o(i)}t._subscribers.length=0}}function T(){this.error=null}function O(t,e){try{return t(e)}catch(r){xt.error=r;return xt}}function S(t,e,r,n){var o=i(r),u=void 0,a=void 0;if(o){u=O(r,n);if(u===xt){a=u.error;u.error=null}else if(u===e){g(e,l());return}}else u=n;e._state!==At||(o&&void 0===a?m(e,u):void 0!==a?g(e,a):t===Pt?b(e,u):t===Rt&&g(e,u))}function A(t,e){var r=!1;try{e(function(e){if(!r){r=!0;m(t,e)}},function(e){if(!r){r=!0;g(t,e)}})}catch(n){g(t,n)}}function P(t,e,r){var n=this,o=n._state;if(o===Pt&&!t||o===Rt&&!e){jt.instrument&&c("chained",n,n);return n}n._onError=null;var i=new n.constructor(h,r),u=n._result;jt.instrument&&c("chained",n,i);if(o===At)j(n,i,t,e);else{var a=o===Pt?t:e;jt.async(function(){return S(o,i,a,u)})}return i}function R(t,e,r){return t===Pt?{state:"fulfilled",value:r}:{state:"rejected",reason:r}}function k(t,e){return Tt(t)?new Mt(this,t,(!0),e).promise:this.reject(new TypeError("Promise.all must be called with an array"),e)}function x(t,e){var r=this,n=new r(h,e);if(!Tt(t)){g(n,new TypeError("Promise.race must be called with an array"));return n}for(var o=0;n._state===At&&o<t.length;o++)j(r.resolve(t[o]),void 0,function(t){return m(n,t)},function(t){return g(n,t)});return n}function M(t,e){var r=this,n=new r(h,e);g(n,t);return n}function C(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function I(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function N(){this.value=void 0}function V(t){try{return t.then}catch(e){Vt.value=e;return Vt}}function D(t,e,r){try{t.apply(e,r)}catch(n){Vt.value=n;return Vt}}function K(t,e){for(var r={},n=t.length,o=new Array(n),i=0;i<n;i++)o[i]=t[i];for(var u=0;u<e.length;u++){var a=e[u];r[a]=o[u+1]}return r}function U(t){for(var e=t.length,r=new Array(e-1),n=1;n<e;n++)r[n-1]=t[n];return r}function q(t,e){return{then:function(r,n){return t.call(e,r,n)}}}function F(t,e){var r=function(){for(var r=this,n=arguments.length,o=new Array(n+1),i=!1,u=0;u<n;++u){var a=arguments[u];if(!i){i=W(a);if(i===Dt){var s=new Nt(h);g(s,Dt.value);return s}i&&i!==!0&&(a=q(i,a))}o[u]=a}var c=new Nt(h);o[n]=function(t,r){t?g(c,t):void 0===e?m(c,r):e===!0?m(c,U(arguments)):Tt(e)?m(c,K(arguments,e)):m(c,r)};return i?L(c,o,t,r):G(c,o,t,r)};r.__proto__=t;return r}function G(t,e,r,n){var o=D(r,n,e);o===Vt&&g(t,o.value);return t}function L(t,e,r,n){return Nt.all(e).then(function(e){var o=D(r,n,e);o===Vt&&g(t,o.value);return t})}function W(t){return!(!t||"object"!=typeof t)&&(t.constructor===Nt||V(t))}function Y(t,e){return Nt.all(t,e)}function $(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function z(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}});e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function B(t,e){return Tt(t)?new Kt(Nt,t,e).promise:Nt.reject(new TypeError("Promise.allSettled must be called with an array"),e)}function H(t,e){return Nt.race(t,e)}function J(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function Q(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}});e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function X(t,e){return u(t)?new qt(Nt,t,e).promise:Nt.reject(new TypeError("Promise.hash must be called with an object"),e)}function Z(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function tt(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}});e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function et(t,e){return u(t)?new Ft(Nt,t,(!1),e).promise:Nt.reject(new TypeError("RSVP.hashSettled must be called with an object"),e)}function rt(t){setTimeout(function(){throw t});throw t}function nt(t){var e={resolve:void 0,reject:void 0};e.promise=new Nt(function(t,r){e.resolve=t;e.reject=r},t);return e}function ot(t,e,r){return Tt(t)?i(e)?Nt.all(t,r).then(function(t){for(var n=t.length,o=new Array(n),i=0;i<n;i++)o[i]=e(t[i]);return Nt.all(o,r)}):Nt.reject(new TypeError("RSVP.map expects a function as a second argument"),r):Nt.reject(new TypeError("RSVP.map must be called with an array"),r)}function it(t,e){return Nt.resolve(t,e)}function ut(t,e){return Nt.reject(t,e)}function at(t,e){return Nt.all(t,e)}function st(t,e){return Nt.resolve(t,e).then(function(t){return at(t,e)})}function ct(t,e,r){if(!(Tt(t)||u(t)&&void 0!==t.then))return Nt.reject(new TypeError("RSVP.filter must be called with an array or promise"),r);if(!i(e))return Nt.reject(new TypeError("RSVP.filter expects function as a second argument"),r);var n=Tt(t)?at(t,r):st(t,r);return n.then(function(t){for(var n=t.length,o=new Array(n),i=0;i<n;i++)o[i]=e(t[i]);return at(o,r).then(function(e){for(var r=new Array(n),o=0,i=0;i<n;i++)if(e[i]){r[o]=t[i];o++}r.length=o;return r})})}function ft(t,e){Ht[Gt]=t;Ht[Gt+1]=e;Gt+=2;2===Gt&&Jt()}function lt(){var t=process.nextTick,e=process.versions.node.match(/^(?:(\d+)\.)?(?:(\d+)\.)?(\*|\d+)$/);Array.isArray(e)&&"0"===e[1]&&"10"===e[2]&&(t=setImmediate);return function(){return t(dt)}}function ht(){return"undefined"!=typeof Lt?function(){Lt(dt)}:vt()}function pt(){var t=0,e=new $t(dt),r=document.createTextNode("");e.observe(r,{characterData:!0});return function(){return r.data=t=++t%2}}function yt(){var t=new MessageChannel;t.port1.onmessage=dt;return function(){return t.port2.postMessage(0)}}function vt(){return function(){return setTimeout(dt,1)}}function dt(){for(var t=0;t<Gt;t+=2){var e=Ht[t],r=Ht[t+1];e(r);Ht[t]=void 0;Ht[t+1]=void 0}Gt=0}function _t(){try{var t=require,e=t("vertx");Lt=e.runOnLoop||e.runOnContext;return ht()}catch(r){return vt()}}function mt(t,e,r){e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r;return t}function wt(){jt.on.apply(jt,arguments)}function bt(){jt.off.apply(jt,arguments)}var gt={mixin:function(t){t.on=this.on;t.off=this.off;t.trigger=this.trigger;t._promiseCallbacks=void 0;return t},on:function(t,n){if("function"!=typeof n)throw new TypeError("Callback must be a function");var o=r(this),i=void 0;i=o[t];i||(i=o[t]=[]);e(i,n)===-1&&i.push(n)},off:function(t,n){var o=r(this),i=void 0,u=void 0;if(n){i=o[t];u=e(i,n);u!==-1&&i.splice(u,1)}else o[t]=[]},trigger:function(t,e,n){var o=r(this),i=void 0,u=void 0;if(i=o[t])for(var a=0;a<i.length;a++){u=i[a];u(e,n)}}},jt={instrument:!1};gt.mixin(jt);var Et=void 0;Et=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)};var Tt=Et,Ot=Date.now||function(){return(new Date).getTime()},St=[],At=void 0,Pt=1,Rt=2,kt=new T,xt=new T,Mt=function(){function t(t,e,r,n){this._instanceConstructor=t;this.promise=new t(h,n);this._abortOnReject=r;this._init.apply(this,arguments)}t.prototype._init=function(t,e){var r=e.length||0;this.length=r;this._remaining=r;this._result=new Array(r);this._enumerate(e);0===this._remaining&&b(this.promise,this._result)};t.prototype._enumerate=function(t){for(var e=this.length,r=this.promise,n=0;r._state===At&&n<e;n++)this._eachEntry(t[n],n)};t.prototype._settleMaybeThenable=function(t,e){var r=this._instanceConstructor,n=r.resolve;if(n===f){var o=p(t);if(o===P&&t._state!==At){t._onError=null;this._settledAt(t._state,e,t._result)}else if("function"!=typeof o){this._remaining--;this._result[e]=this._makeResult(Pt,e,t)}else if(r===Nt){var i=new r(h);_(i,t,o);this._willSettleAt(i,e)}else this._willSettleAt(new r(function(e){return e(t)}),e)}else this._willSettleAt(n(t),e)};t.prototype._eachEntry=function(t,e){if(a(t))this._settleMaybeThenable(t,e);else{this._remaining--;this._result[e]=this._makeResult(Pt,e,t)}};t.prototype._settledAt=function(t,e,r){var n=this.promise;if(n._state===At)if(this._abortOnReject&&t===Rt)g(n,r);else{this._remaining--;this._result[e]=this._makeResult(t,e,r);0===this._remaining&&b(n,this._result)}};t.prototype._makeResult=function(t,e,r){return r};t.prototype._willSettleAt=function(t,e){var r=this;j(t,void 0,function(t){return r._settledAt(Pt,e,t)},function(t){return r._settledAt(Rt,e,t)})};return t}(),Ct="rsvp_"+Ot()+"-",It=0,Nt=function(){function t(e,r){this._id=It++;this._label=r;this._state=void 0;this._result=void 0;this._subscribers=[];jt.instrument&&c("created",this);if(h!==e){"function"!=typeof e&&C();this instanceof t?A(this,e):I()}}t.prototype._onError=function(t){var e=this;jt.after(function(){e._onError&&jt.trigger("error",t,e._label)})};t.prototype["catch"]=function(t,e){return this.then(void 0,t,e)};t.prototype["finally"]=function(t,e){var r=this,n=r.constructor;return r.then(function(e){return n.resolve(t()).then(function(){return e})},function(e){return n.resolve(t()).then(function(){throw e})},e)};return t}();Nt.cast=f;Nt.all=k;Nt.race=x;Nt.resolve=f;Nt.reject=M;Nt.prototype._guidKey=Ct;Nt.prototype.then=P;var Vt=new N,Dt=new N,Kt=function(t){function e(e,r,n){return $(this,t.call(this,e,r,!1,n))}z(e,t);return e}(Mt);Kt.prototype._makeResult=R;var Ut=Object.prototype.hasOwnProperty,qt=function(t){function e(e,r){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],o=arguments[3];return J(this,t.call(this,e,r,n,o))}Q(e,t);e.prototype._init=function(t,e){this._result={};this._enumerate(e);0===this._remaining&&b(this.promise,this._result)};e.prototype._enumerate=function(t){var e=this.promise,r=[];for(var n in t)Ut.call(t,n)&&r.push({position:n,entry:t[n]});var o=r.length;this._remaining=o;for(var i=void 0,u=0;e._state===At&&u<o;u++){i=r[u];this._eachEntry(i.entry,i.position)}};return e}(Mt),Ft=function(t){function e(e,r,n){return Z(this,t.call(this,e,r,!1,n))}tt(e,t);return e}(qt);Ft.prototype._makeResult=R;var Gt=0,Lt=void 0,Wt="undefined"!=typeof window?window:void 0,Yt=Wt||{},$t=Yt.MutationObserver||Yt.WebKitMutationObserver,zt="undefined"==typeof self&&"undefined"!=typeof process&&"[object process]"==={}.toString.call(process),Bt="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,Ht=new Array(1e3),Jt=void 0;Jt=zt?lt():$t?pt():Bt?yt():void 0===Wt&&"function"==typeof require?_t():vt();var Qt=void 0;if("object"==typeof self)Qt=self;else{if("object"!=typeof global)throw new Error("no global: `self` or `global` found");Qt=global}var Xt;jt.async=ft;jt.after=function(t){return setTimeout(t,0)};var Zt=it,te=function(t,e){return jt.async(t,e)};if("undefined"!=typeof window&&"object"==typeof window.__PROMISE_INSTRUMENTATION__){var ee=window.__PROMISE_INSTRUMENTATION__;n("instrument",!0);for(var re in ee)ee.hasOwnProperty(re)&&wt(re,ee[re])}var ne=(Xt={asap:ft,cast:Zt,Promise:Nt,EventTarget:gt,all:Y,allSettled:B,race:H,hash:X,hashSettled:et,rethrow:rt,defer:nt,denodeify:F,configure:n,on:wt,off:bt,resolve:it,reject:ut,map:ot},mt(Xt,"async",te),mt(Xt,"filter",ct),Xt);t["default"]=ne;t.asap=ft;t.cast=Zt;t.Promise=Nt;t.EventTarget=gt;t.all=Y;t.allSettled=B;t.race=H;t.hash=X;t.hashSettled=et;t.rethrow=rt;t.defer=nt;t.denodeify=F;t.configure=n;t.on=wt;t.off=bt;t.resolve=it;t.reject=ut;t.map=ot;t.async=te;t.filter=ct;Object.defineProperty(t,"__esModule",{value:!0})});
\ No newline at end of file
This diff is collapsed.
import Promise from './rsvp/promise';
import EventTarget from './rsvp/events';
import denodeify from './rsvp/node';
import all from './rsvp/all';
import allSettled from './rsvp/all-settled';
import race from './rsvp/race';
import hash from './rsvp/hash';
import hashSettled from './rsvp/hash-settled';
import rethrow from './rsvp/rethrow';
import defer from './rsvp/defer';
import {
config,
configure
} from './rsvp/config';
import map from './rsvp/map';
import resolve from './rsvp/resolve';
import reject from './rsvp/reject';
import filter from './rsvp/filter';
import asap from './rsvp/asap';
// defaults
config.async = asap;
config.after = cb => setTimeout(cb, 0);
const cast = resolve;
const async = (callback, arg) => config.async(callback, arg);
function on() {
config['on'].apply(config, arguments);
}
function off() {
config['off'].apply(config, arguments);
}
// Set up instrumentation through `window.__PROMISE_INTRUMENTATION__`
if (typeof window !== 'undefined' && typeof window['__PROMISE_INSTRUMENTATION__'] === 'object') {
let callbacks = window['__PROMISE_INSTRUMENTATION__'];
configure('instrument', true);
for (let eventName in callbacks) {
if (callbacks.hasOwnProperty(eventName)) {
on(eventName, callbacks[eventName]);
}
}
}
import platform from './rsvp/platform';
// the default export here is for backwards compat:
// https://github.com/tildeio/rsvp.js/issues/434
export default {
asap,
cast,
Promise,
EventTarget,
all,
allSettled,
race,
hash,
hashSettled,
rethrow,
defer,
denodeify,
configure,
on,
off,
resolve,
reject,
map,
['async']: async, // babel seems to error if async isn't a computed prop here...
filter
};
export {
asap,
cast,
Promise,
EventTarget,
all,
allSettled,
race,
hash,
hashSettled,
rethrow,
defer,
denodeify,
configure,
on,
off,
resolve,
reject,
map,
async,
filter
};
import {
objectOrFunction,
isFunction
} from './utils';
import originalThen from './then';
import originalResolve from './promise/resolve';
import instrument from './instrument';
import { config } from './config';
import Promise from './promise';
function withOwnPromise() {
return new TypeError('A promises callback cannot return that same promise.');
}
export function noop() {}
export const PENDING = void 0;
export const FULFILLED = 1;
export const REJECTED = 2;
const GET_THEN_ERROR = new ErrorObject();
export function getThen(promise) {
try {
return promise.then;
} catch(error) {
GET_THEN_ERROR.error = error;
return GET_THEN_ERROR;
}
}
function tryThen(then, value, fulfillmentHandler, rejectionHandler) {
try {
then.call(value, fulfillmentHandler, rejectionHandler);
} catch(e) {
return e;
}
}
function handleForeignThenable(promise, thenable, then) {
config.async(promise => {
let sealed = false;
let error = tryThen(then, thenable, value => {
if (sealed) { return; }
sealed = true;
if (thenable !== value) {
resolve(promise, value, undefined);
} else {
fulfill(promise, value);
}
}, reason => {
if (sealed) { return; }
sealed = true;
reject(promise, reason);
}, 'Settle: ' + (promise._label || ' unknown promise'));
if (!sealed && error) {
sealed = true;
reject(promise, error);
}
}, promise);
}
function handleOwnThenable(promise, thenable) {
if (thenable._state === FULFILLED) {
fulfill(promise, thenable._result);
} else if (thenable._state === REJECTED) {
thenable._onError = null;
reject(promise, thenable._result);
} else {
subscribe(thenable, undefined, value => {
if (thenable !== value) {
resolve(promise, value, undefined);
} else {
fulfill(promise, value);
}
}, reason => reject(promise, reason));
}
}
export function handleMaybeThenable(promise, maybeThenable, then) {
let isOwnThenable =
maybeThenable.constructor === promise.constructor &&
then === originalThen &&
promise.constructor.resolve === originalResolve;
if (isOwnThenable) {
handleOwnThenable(promise, maybeThenable);
} else if (then === GET_THEN_ERROR) {
reject(promise, GET_THEN_ERROR.error);
GET_THEN_ERROR.error = null;
} else if (isFunction(then)) {
handleForeignThenable(promise, maybeThenable, then);
} else {
fulfill(promise, maybeThenable);
}
}
export function resolve(promise, value) {
if (promise === value) {
fulfill(promise, value);
} else if (objectOrFunction(value)) {
handleMaybeThenable(promise, value, getThen(value));
} else {
fulfill(promise, value);
}
}
export function publishRejection(promise) {
if (promise._onError) {
promise._onError(promise._result);
}
publish(promise);
}
export function fulfill(promise, value) {
if (promise._state !== PENDING) { return; }
promise._result = value;
promise._state = FULFILLED;
if (promise._subscribers.length === 0) {
if (config.instrument) {
instrument('fulfilled', promise);
}
} else {
config.async(publish, promise);
}
}
export function reject(promise, reason) {
if (promise._state !== PENDING) { return; }
promise._state = REJECTED;
promise._result = reason;
config.async(publishRejection, promise);
}
export function subscribe(parent, child, onFulfillment, onRejection) {
let subscribers = parent._subscribers;
let length = subscribers.length;
parent._onError = null;
subscribers[length] = child;
subscribers[length + FULFILLED] = onFulfillment;
subscribers[length + REJECTED] = onRejection;
if (length === 0 && parent._state) {
config.async(publish, parent);
}
}
export function publish(promise) {
let subscribers = promise._subscribers;
let settled = promise._state;
if (config.instrument) {
instrument(settled === FULFILLED ? 'fulfilled' : 'rejected', promise);
}
if (subscribers.length === 0) { return; }
let child, callback, result = promise._result;
for (let i = 0; i < subscribers.length; i += 3) {
child = subscribers[i];
callback = subscribers[i + settled];
if (child) {
invokeCallback(settled, child, callback, result);
} else {
callback(result);
}
}
promise._subscribers.length = 0;
}
function ErrorObject() {
this.error = null;
}
const TRY_CATCH_ERROR = new ErrorObject();
function tryCatch(callback, result) {
try {
return callback(result);
} catch(e) {
TRY_CATCH_ERROR.error = e;
return TRY_CATCH_ERROR;
}
}
export function invokeCallback(state, promise, callback, result) {
let hasCallback = isFunction(callback);
let value, error;
if (hasCallback) {
value = tryCatch(callback, result);
if (value === TRY_CATCH_ERROR) {
error = value.error;
value.error = null; // release
} else if (value === promise) {
reject(promise, withOwnPromise());
return;
}
} else {
value = result;
}
if (promise._state !== PENDING) {
// noop
} else if (hasCallback && error === undefined) {
resolve(promise, value);
} else if (error !== undefined) {
reject(promise, error);
} else if (state === FULFILLED) {
fulfill(promise, value);
} else if (state === REJECTED) {
reject(promise, value);
}
}
export function initializePromise(promise, resolver) {
let resolved = false;
try {
resolver(value => {
if (resolved) { return; }
resolved = true;
resolve(promise, value);
}, reason => {
if (resolved) { return; }
resolved = true;
reject(promise, reason);
});
} catch(e) {
reject(promise, e);
}
}
import {
default as Enumerator,
makeSettledResult
} from './enumerator';
import Promise from './promise';
import { isArray } from './utils';
class AllSettled extends Enumerator {
constructor(Constructor, entries, label) {
super(Constructor, entries, false /* don't abort on reject */, label);
}
}
AllSettled.prototype._makeResult = makeSettledResult;
/**
`RSVP.allSettled` is similar to `RSVP.all`, but instead of implementing
a fail-fast method, it waits until all the promises have returned and
shows you all the results. This is useful if you want to handle multiple
promises' failure states together as a set.
Returns a promise that is fulfilled when all the given promises have been
settled. The return promise is fulfilled with an array of the states of
the promises passed into the `promises` array argument.
Each state object will either indicate fulfillment or rejection, and
provide the corresponding value or reason. The states will take one of
the following formats:
```javascript
{ state: 'fulfilled', value: value }
or
{ state: 'rejected', reason: reason }
```
Example:
```javascript
let promise1 = RSVP.Promise.resolve(1);
let promise2 = RSVP.Promise.reject(new Error('2'));
let promise3 = RSVP.Promise.reject(new Error('3'));
let promises = [ promise1, promise2, promise3 ];
RSVP.allSettled(promises).then(function(array){
// array == [
// { state: 'fulfilled', value: 1 },
// { state: 'rejected', reason: Error },
// { state: 'rejected', reason: Error }
// ]
// Note that for the second item, reason.message will be '2', and for the
// third item, reason.message will be '3'.
}, function(error) {
// Not run. (This block would only be called if allSettled had failed,
// for instance if passed an incorrect argument type.)
});
```
@method allSettled
@static
@for RSVP
@param {Array} entries
@param {String} label - optional string that describes the promise.
Useful for tooling.
@return {Promise} promise that is fulfilled with an array of the settled
states of the constituent promises.
*/
export default function allSettled(entries, label) {
if (!isArray(entries)) {
return Promise.reject(new TypeError("Promise.allSettled must be called with an array"), label);
}
return new AllSettled(Promise, entries, label).promise;
}
import Promise from "./promise";
/**
This is a convenient alias for `RSVP.Promise.all`.
@method all
@static
@for RSVP
@param {Array} array Array of promises.
@param {String} label An optional label. This is useful
for tooling.
*/
export default function all(array, label) {
return Promise.all(array, label);
}
let len = 0;
let vertxNext;
export default function asap(callback, arg) {
queue[len] = callback;
queue[len + 1] = arg;
len += 2;
if (len === 2) {
// If len is 1, that means that we need to schedule an async flush.
// If additional callbacks are queued before the queue is flushed, they
// will be processed by this flush that we are scheduling.
scheduleFlush();
}
}
const browserWindow = (typeof window !== 'undefined') ? window : undefined;
const browserGlobal = browserWindow || {};
const BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;
const isNode = typeof self === 'undefined' &&
typeof process !== 'undefined' && {}.toString.call(process) === '[object process]';
// test for web worker but not in IE10
const isWorker = typeof Uint8ClampedArray !== 'undefined' &&
typeof importScripts !== 'undefined' &&
typeof MessageChannel !== 'undefined';
// node
function useNextTick() {
let nextTick = process.nextTick;
// node version 0.10.x displays a deprecation warning when nextTick is used recursively
// setImmediate should be used instead instead
let version = process.versions.node.match(/^(?:(\d+)\.)?(?:(\d+)\.)?(\*|\d+)$/);
if (Array.isArray(version) && version[1] === '0' && version[2] === '10') {
nextTick = setImmediate;
}
return () => nextTick(flush);
}
// vertx
function useVertxTimer() {
if (typeof vertxNext !== 'undefined') {
return function() {
vertxNext(flush);
};
}
return useSetTimeout();
}
function useMutationObserver() {
let iterations = 0;
let observer = new BrowserMutationObserver(flush);
let node = document.createTextNode('');
observer.observe(node, { characterData: true });
return () => node.data = (iterations = ++iterations % 2);
}
// web worker
function useMessageChannel() {
let channel = new MessageChannel();
channel.port1.onmessage = flush;
return () => channel.port2.postMessage(0);
}
function useSetTimeout() {
return () => setTimeout(flush, 1);
}
const queue = new Array(1000);
function flush() {
for (let i = 0; i < len; i+=2) {
let callback = queue[i];
let arg = queue[i+1];
callback(arg);
queue[i] = undefined;
queue[i+1] = undefined;
}
len = 0;
}
function attemptVertex() {
try {
let r = require;
let vertx = r('vertx');
vertxNext = vertx.runOnLoop || vertx.runOnContext;
return useVertxTimer();
} catch(e) {
return useSetTimeout();
}
}
let scheduleFlush;
// Decide what async method to use to triggering processing of queued callbacks:
if (isNode) {
scheduleFlush = useNextTick();
} else if (BrowserMutationObserver) {
scheduleFlush = useMutationObserver();
} else if (isWorker) {
scheduleFlush = useMessageChannel();
} else if (browserWindow === undefined && typeof require === 'function') {
scheduleFlush = attemptVertex();
} else {
scheduleFlush = useSetTimeout();
}
import EventTarget from './events';
const config = {
instrument: false
};
EventTarget['mixin'](config);
function configure(name, value) {
if (arguments.length === 2) {
config[name] = value;
} else {
return config[name];
}
}
export {
config,
configure
};
import Promise from "./promise";
/**
`RSVP.defer` returns an object similar to jQuery's `$.Deferred`.
`RSVP.defer` should be used when porting over code reliant on `$.Deferred`'s
interface. New code should use the `RSVP.Promise` constructor instead.
The object returned from `RSVP.defer` is a plain object with three properties:
* promise - an `RSVP.Promise`.
* reject - a function that causes the `promise` property on this object to
become rejected
* resolve - a function that causes the `promise` property on this object to
become fulfilled.
Example:
```javascript
let deferred = RSVP.defer();
deferred.resolve("Success!");
deferred.promise.then(function(value){
// value here is "Success!"
});
```
@method defer
@static
@for RSVP
@param {String} label optional string for labeling the promise.
Useful for tooling.
@return {Object}
*/
export default function defer(label) {
let deferred = { resolve: undefined, reject: undefined };
deferred.promise = new Promise((resolve, reject) => {
deferred.resolve = resolve;
deferred.reject = reject;
}, label);
return deferred;
}
import {
isArray,
isMaybeThenable
} from './utils';
import {
noop,
resolve,
handleMaybeThenable,
reject,
fulfill,
subscribe,
FULFILLED,
REJECTED,
PENDING,
getThen
} from './-internal';
import Promise from './promise';
import originalThen from './then';
import originalResolve from './promise/resolve';
export default class Enumerator {
constructor(Constructor, input, abortOnReject, label) {
this._instanceConstructor = Constructor;
this.promise = new Constructor(noop, label);
this._abortOnReject = abortOnReject;
this._init(...arguments);
}
_init(Constructor, input) {
let len = input.length || 0;
this.length = len;
this._remaining = len;
this._result = new Array(len);
this._enumerate(input);
if (this._remaining === 0) {
fulfill(this.promise, this._result);
}
}
_enumerate(input) {
let length = this.length;
let promise = this.promise;
for (let i = 0; promise._state === PENDING && i < length; i++) {
this._eachEntry(input[i], i);
}
}
_settleMaybeThenable(entry, i) {
let c = this._instanceConstructor;
let resolve = c.resolve;
if (resolve === originalResolve) {
let then = getThen(entry);
if (then === originalThen && entry._state !== PENDING) {
entry._onError = null;
this._settledAt(entry._state, i, entry._result);
} else if (typeof then !== 'function') {
this._remaining--;
this._result[i] = this._makeResult(FULFILLED, i, entry);
} else if (c === Promise) {
let promise = new c(noop);
handleMaybeThenable(promise, entry, then);
this._willSettleAt(promise, i);
} else {
this._willSettleAt(new c(resolve => resolve(entry)), i);
}
} else {
this._willSettleAt(resolve(entry), i);
}
}
_eachEntry(entry, i) {
if (isMaybeThenable(entry)) {
this._settleMaybeThenable(entry, i);
} else {
this._remaining--;
this._result[i] = this._makeResult(FULFILLED, i, entry);
}
}
_settledAt(state, i, value) {
let promise = this.promise;
if (promise._state === PENDING) {
if (this._abortOnReject && state === REJECTED) {
reject(promise, value);
} else {
this._remaining--;
this._result[i] = this._makeResult(state, i, value);
if (this._remaining === 0) {
fulfill(promise, this._result);
}
}
}
}
_makeResult(state, i, value) {
return value;
}
_willSettleAt(promise, i) {
let enumerator = this;
subscribe(
promise, undefined,
value => enumerator._settledAt(FULFILLED, i, value),
reason => enumerator._settledAt(REJECTED, i, reason)
);
}
}
export function makeSettledResult(state, position, value) {
if (state === FULFILLED) {
return {
state: 'fulfilled',
value: value
};
} else {
return {
state: 'rejected',
reason: value
};
}
}
function indexOf(callbacks, callback) {
for (let i=0, l=callbacks.length; i<l; i++) {
if (callbacks[i] === callback) { return i; }
}
return -1;
}
function callbacksFor(object) {
let callbacks = object._promiseCallbacks;
if (!callbacks) {
callbacks = object._promiseCallbacks = {};
}
return callbacks;
}
/**
@class RSVP.EventTarget
*/
export default {
/**
`RSVP.EventTarget.mixin` extends an object with EventTarget methods. For
Example:
```javascript
let object = {};
RSVP.EventTarget.mixin(object);
object.on('finished', function(event) {
// handle event
});
object.trigger('finished', { detail: value });
```
`EventTarget.mixin` also works with prototypes:
```javascript
let Person = function() {};
RSVP.EventTarget.mixin(Person.prototype);
let yehuda = new Person();
let tom = new Person();
yehuda.on('poke', function(event) {
console.log('Yehuda says OW');
});
tom.on('poke', function(event) {
console.log('Tom says OW');
});
yehuda.trigger('poke');
tom.trigger('poke');
```
@method mixin
@for RSVP.EventTarget
@private
@param {Object} object object to extend with EventTarget methods
*/
mixin(object) {
object['on'] = this['on'];
object['off'] = this['off'];
object['trigger'] = this['trigger'];
object._promiseCallbacks = undefined;
return object;
},
/**
Registers a callback to be executed when `eventName` is triggered
```javascript
object.on('event', function(eventInfo){
// handle the event
});
object.trigger('event');
```
@method on
@for RSVP.EventTarget
@private
@param {String} eventName name of the event to listen for
@param {Function} callback function to be called when the event is triggered.
*/
on(eventName, callback) {
if (typeof callback !== 'function') {
throw new TypeError('Callback must be a function');
}
let allCallbacks = callbacksFor(this), callbacks;
callbacks = allCallbacks[eventName];
if (!callbacks) {
callbacks = allCallbacks[eventName] = [];
}
if (indexOf(callbacks, callback) === -1) {
callbacks.push(callback);
}
},
/**
You can use `off` to stop firing a particular callback for an event:
```javascript
function doStuff() { // do stuff! }
object.on('stuff', doStuff);
object.trigger('stuff'); // doStuff will be called
// Unregister ONLY the doStuff callback
object.off('stuff', doStuff);
object.trigger('stuff'); // doStuff will NOT be called
```
If you don't pass a `callback` argument to `off`, ALL callbacks for the
event will not be executed when the event fires. For example:
```javascript
let callback1 = function(){};
let callback2 = function(){};
object.on('stuff', callback1);
object.on('stuff', callback2);
object.trigger('stuff'); // callback1 and callback2 will be executed.
object.off('stuff');
object.trigger('stuff'); // callback1 and callback2 will not be executed!
```
@method off
@for RSVP.EventTarget
@private
@param {String} eventName event to stop listening to
@param {Function} callback optional argument. If given, only the function
given will be removed from the event's callback queue. If no `callback`
argument is given, all callbacks will be removed from the event's callback
queue.
*/
off(eventName, callback) {
let allCallbacks = callbacksFor(this), callbacks, index;
if (!callback) {
allCallbacks[eventName] = [];
return;
}
callbacks = allCallbacks[eventName];
index = indexOf(callbacks, callback);
if (index !== -1) { callbacks.splice(index, 1); }
},
/**
Use `trigger` to fire custom events. For example:
```javascript
object.on('foo', function(){
console.log('foo event happened!');
});
object.trigger('foo');
// 'foo event happened!' logged to the console
```
You can also pass a value as a second argument to `trigger` that will be
passed as an argument to all event listeners for the event:
```javascript
object.on('foo', function(value){
console.log(value.name);
});
object.trigger('foo', { name: 'bar' });
// 'bar' logged to the console
```
@method trigger
@for RSVP.EventTarget
@private
@param {String} eventName name of the event to be triggered
@param {*} options optional value to be passed to any event handlers for
the given `eventName`
*/
trigger(eventName, options, label) {
let allCallbacks = callbacksFor(this), callbacks, callback;
if (callbacks = allCallbacks[eventName]) {
// Don't cache the callbacks.length since it may grow
for (let i=0; i<callbacks.length; i++) {
callback = callbacks[i];
callback(options, label);
}
}
}
};
import Promise from './promise';
import {
isFunction,
isArray,
isObject
} from './utils';
/**
`RSVP.filter` is similar to JavaScript's native `filter` method, except that it
waits for all promises to become fulfilled before running the `filterFn` on
each item in given to `promises`. `RSVP.filter` returns a promise that will
become fulfilled with the result of running `filterFn` on the values the
promises become fulfilled with.
For example:
```javascript
let promise1 = RSVP.resolve(1);
let promise2 = RSVP.resolve(2);
let promise3 = RSVP.resolve(3);
let promises = [promise1, promise2, promise3];
let filterFn = function(item){
return item > 1;
};
RSVP.filter(promises, filterFn).then(function(result){
// result is [ 2, 3 ]
});
```
If any of the `promises` given to `RSVP.filter` are rejected, the first promise
that is rejected will be given as an argument to the returned promise's
rejection handler. For example:
```javascript
let promise1 = RSVP.resolve(1);
let promise2 = RSVP.reject(new Error('2'));
let promise3 = RSVP.reject(new Error('3'));
let promises = [ promise1, promise2, promise3 ];
let filterFn = function(item){
return item > 1;
};
RSVP.filter(promises, filterFn).then(function(array){
// Code here never runs because there are rejected promises!
}, function(reason) {
// reason.message === '2'
});
```
`RSVP.filter` will also wait for any promises returned from `filterFn`.
For instance, you may want to fetch a list of users then return a subset
of those users based on some asynchronous operation:
```javascript
let alice = { name: 'alice' };
let bob = { name: 'bob' };
let users = [ alice, bob ];
let promises = users.map(function(user){
return RSVP.resolve(user);
});
let filterFn = function(user){
// Here, Alice has permissions to create a blog post, but Bob does not.
return getPrivilegesForUser(user).then(function(privs){
return privs.can_create_blog_post === true;
});
};
RSVP.filter(promises, filterFn).then(function(users){
// true, because the server told us only Alice can create a blog post.
users.length === 1;
// false, because Alice is the only user present in `users`
users[0] === bob;
});
```
@method filter
@static
@for RSVP
@param {Array} promises
@param {Function} filterFn - function to be called on each resolved value to
filter the final results.
@param {String} label optional string describing the promise. Useful for
tooling.
@return {Promise}
*/
function resolveAll(promises, label) {
return Promise.all(promises, label);
}
function resolveSingle(promise, label) {
return Promise.resolve(promise, label).then(function(promises){
return resolveAll(promises, label);
});
}
export default function filter(promises, filterFn, label) {
if (!isArray(promises) && !(isObject(promises) && promises.then !== undefined )) {
return Promise.reject(new TypeError("RSVP.filter must be called with an array or promise"), label);
}
if (!isFunction(filterFn)) {
return Promise.reject(new TypeError("RSVP.filter expects function as a second argument"), label);
}
let promise = isArray(promises) ? resolveAll(promises, label) : resolveSingle(promises, label);
return promise.then(values => {
let length = values.length;
let filtered = new Array(length);
for (let i = 0; i < length; i++) {
filtered[i] = filterFn(values[i]);
}
return resolveAll(filtered, label).then(filtered => {
let results = new Array(length);
let newLength = 0;
for (let i = 0; i < length; i++) {
if (filtered[i]) {
results[newLength] = values[i];
newLength++;
}
}
results.length = newLength;
return results;
});
});
}
import Promise from './promise';
import PromiseHash from './promise-hash';
import { isObject } from './utils';
import { makeSettledResult } from './enumerator';
class HashSettled extends PromiseHash {
constructor(Constructor, object, label) {
super(Constructor, object, false, label);
}
}
HashSettled.prototype._makeResult = makeSettledResult;
/**
`RSVP.hashSettled` is similar to `RSVP.allSettled`, but takes an object
instead of an array for its `promises` argument.
Unlike `RSVP.all` or `RSVP.hash`, which implement a fail-fast method,
but like `RSVP.allSettled`, `hashSettled` waits until all the
constituent promises have returned and then shows you all the results
with their states and values/reasons. This is useful if you want to
handle multiple promises' failure states together as a set.
Returns a promise that is fulfilled when all the given promises have been
settled, or rejected if the passed parameters are invalid.
The returned promise is fulfilled with a hash that has the same key names as
the `promises` object argument. If any of the values in the object are not
promises, they will be copied over to the fulfilled object and marked with state
'fulfilled'.
Example:
```javascript
let promises = {
myPromise: RSVP.Promise.resolve(1),
yourPromise: RSVP.Promise.resolve(2),
theirPromise: RSVP.Promise.resolve(3),
notAPromise: 4
};
RSVP.hashSettled(promises).then(function(hash){
// hash here is an object that looks like:
// {
// myPromise: { state: 'fulfilled', value: 1 },
// yourPromise: { state: 'fulfilled', value: 2 },
// theirPromise: { state: 'fulfilled', value: 3 },
// notAPromise: { state: 'fulfilled', value: 4 }
// }
});
```
If any of the `promises` given to `RSVP.hash` are rejected, the state will
be set to 'rejected' and the reason for rejection provided.
Example:
```javascript
let promises = {
myPromise: RSVP.Promise.resolve(1),
rejectedPromise: RSVP.Promise.reject(new Error('rejection')),
anotherRejectedPromise: RSVP.Promise.reject(new Error('more rejection')),
};
RSVP.hashSettled(promises).then(function(hash){
// hash here is an object that looks like:
// {
// myPromise: { state: 'fulfilled', value: 1 },
// rejectedPromise: { state: 'rejected', reason: Error },
// anotherRejectedPromise: { state: 'rejected', reason: Error },
// }
// Note that for rejectedPromise, reason.message == 'rejection',
// and for anotherRejectedPromise, reason.message == 'more rejection'.
});
```
An important note: `RSVP.hashSettled` is intended for plain JavaScript objects that
are just a set of keys and values. `RSVP.hashSettled` will NOT preserve prototype
chains.
Example:
```javascript
function MyConstructor(){
this.example = RSVP.Promise.resolve('Example');
}
MyConstructor.prototype = {
protoProperty: RSVP.Promise.resolve('Proto Property')
};
let myObject = new MyConstructor();
RSVP.hashSettled(myObject).then(function(hash){
// protoProperty will not be present, instead you will just have an
// object that looks like:
// {
// example: { state: 'fulfilled', value: 'Example' }
// }
//
// hash.hasOwnProperty('protoProperty'); // false
// 'undefined' === typeof hash.protoProperty
});
```
@method hashSettled
@for RSVP
@param {Object} object
@param {String} label optional string that describes the promise.
Useful for tooling.
@return {Promise} promise that is fulfilled when when all properties of `promises`
have been settled.
@static
*/
export default function hashSettled(object, label) {
if (!isObject(object)) {
return Promise.reject(new TypeError("RSVP.hashSettled must be called with an object"), label);
}
return new HashSettled(Promise, object, false, label).promise;
}
import Promise from './promise';
import PromiseHash from './promise-hash';
import { isObject } from './utils';
/**
`RSVP.hash` is similar to `RSVP.all`, but takes an object instead of an array
for its `promises` argument.
Returns a promise that is fulfilled when all the given promises have been
fulfilled, or rejected if any of them become rejected. The returned promise
is fulfilled with a hash that has the same key names as the `promises` object
argument. If any of the values in the object are not promises, they will
simply be copied over to the fulfilled object.
Example:
```javascript
let promises = {
myPromise: RSVP.resolve(1),
yourPromise: RSVP.resolve(2),
theirPromise: RSVP.resolve(3),
notAPromise: 4
};
RSVP.hash(promises).then(function(hash){
// hash here is an object that looks like:
// {
// myPromise: 1,
// yourPromise: 2,
// theirPromise: 3,
// notAPromise: 4
// }
});
````
If any of the `promises` given to `RSVP.hash` are rejected, the first promise
that is rejected will be given as the reason to the rejection handler.
Example:
```javascript
let promises = {
myPromise: RSVP.resolve(1),
rejectedPromise: RSVP.reject(new Error('rejectedPromise')),
anotherRejectedPromise: RSVP.reject(new Error('anotherRejectedPromise')),
};
RSVP.hash(promises).then(function(hash){
// Code here never runs because there are rejected promises!
}, function(reason) {
// reason.message === 'rejectedPromise'
});
```
An important note: `RSVP.hash` is intended for plain JavaScript objects that
are just a set of keys and values. `RSVP.hash` will NOT preserve prototype
chains.
Example:
```javascript
function MyConstructor(){
this.example = RSVP.resolve('Example');
}
MyConstructor.prototype = {
protoProperty: RSVP.resolve('Proto Property')
};
let myObject = new MyConstructor();
RSVP.hash(myObject).then(function(hash){
// protoProperty will not be present, instead you will just have an
// object that looks like:
// {
// example: 'Example'
// }
//
// hash.hasOwnProperty('protoProperty'); // false
// 'undefined' === typeof hash.protoProperty
});
```
@method hash
@static
@for RSVP
@param {Object} object
@param {String} label optional string that describes the promise.
Useful for tooling.
@return {Promise} promise that is fulfilled when all properties of `promises`
have been fulfilled, or rejected if any of them become rejected.
*/
export default function hash(object, label) {
if (!isObject(object)) {
return Promise.reject(new TypeError("Promise.hash must be called with an object"), label);
}
return new PromiseHash(Promise, object, label).promise;
}
import { config } from './config';
import { now } from './utils';
const queue = [];
function scheduleFlush() {
setTimeout(() => {
for (let i = 0; i < queue.length; i++) {
let entry = queue[i];
let payload = entry.payload;
payload.guid = payload.key + payload.id;
payload.childGuid = payload.key + payload.childId;
if (payload.error) {
payload.stack = payload.error.stack;
}
config['trigger'](entry.name, entry.payload);
}
queue.length = 0;
}, 50);
}
export default function instrument(eventName, promise, child) {
if (1 === queue.push({
name: eventName,
payload: {
key: promise._guidKey,
id: promise._id,
eventName: eventName,
detail: promise._result,
childId: child && child._id,
label: promise._label,
timeStamp: now(),
error: config["instrument-with-stack"] ? new Error(promise._label) : null
}})) {
scheduleFlush();
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment