Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

promist

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

promist - npm Package Compare versions

Comparing version 0.5.2 to 0.5.3

CHANGELOG.md

19

compose/cancellable.js

@@ -15,20 +15,21 @@ "use strict";

function cancellable(promise) {
if (_mark.default.get(promise, 'cancellable')) return promise;
const p = promise;
if (_mark.default.get(p, 'cancellable')) return p;
_mark.default.set(promise, 'cancellable');
_mark.default.set(p, 'cancellable');
let cancellable = true;
promise.cancelled = false;
p.cancelled = false;
promise.cancel = function cancel() {
p.cancel = function cancel() {
if (!cancellable) return;
promise.cancelled = true;
this.cancelled = true;
};
const unfulfilled = new Promise(() => {});
promise.then(() => cancellable = false).catch(() => cancellable = false);
return (0, _intercept.default)(promise, p => {
return p.then(val => promise.cancelled ? unfulfilled : val).catch(err => promise.cancelled ? unfulfilled : Promise.reject(err));
p.then(() => cancellable = false).catch(() => cancellable = false);
return (0, _intercept.default)(p, px => {
return px.then(val => p.cancelled ? unfulfilled : val).catch(err => p.cancelled ? unfulfilled : Promise.reject(err));
});
}
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jb21wb3NlL2NhbmNlbGxhYmxlLmpzIl0sIm5hbWVzIjpbImNhbmNlbGxhYmxlIiwicHJvbWlzZSIsIm1hcmsiLCJnZXQiLCJzZXQiLCJjYW5jZWxsZWQiLCJjYW5jZWwiLCJ1bmZ1bGZpbGxlZCIsIlByb21pc2UiLCJ0aGVuIiwiY2F0Y2giLCJwIiwidmFsIiwiZXJyIiwicmVqZWN0Il0sIm1hcHBpbmdzIjoiOzs7Ozs7O0FBQUE7O0FBQ0E7Ozs7QUFFZSxTQUFTQSxXQUFULENBQXFCQyxPQUFyQixFQUE4QjtBQUMzQyxNQUFJQyxjQ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HAuY2FuY2VsbGVkID8gdW5mdWxmaWxsZWQgOiB2YWwpKVxuICAgICAgLmNhdGNoKChlcnIpID0+IChwLmNhbmNlbGxlZCA/IHVuZnVsZmlsbGVkIDogUHJvbWlzZS5yZWplY3QoZXJyKSkpO1xuICB9KTtcbn1cbiJdfQ==

@@ -17,14 +17,15 @@ "use strict";

function defer(promise) {
if (_mark.default.get(promise, 'deferrable')) return promise;
const p = promise;
if (_mark.default.get(p, 'deferrable')) return p;
_mark.default.set(promise, 'deferrable');
const p = (0, _deferred.default)();
promise.resolve = p.resolve;
promise.reject = p.reject;
return (0, _intercept.default)(promise, promise => {
promise.then(val => p.resolve(val)).catch(reason => p.reject(reason));
return p;
const px = (0, _deferred.default)();
p.resolve = px.resolve;
p.reject = px.reject;
return (0, _intercept.default)(p, py => {
py.then(val => px.resolve(val)).catch(reason => px.reject(reason));
return px;
});
}
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jb21wb3NlL2RlZmVycmFibGUuanMiXSwibmFtZXMiOlsiZGVmZXIiLCJwcm9taXNlIiwibWFyayIsImdldCIsInNldCIsInAiLCJyZXNvbHZlIiwicmVqZWN0IiwidGhlbiIsInZhbCIsImNhdGNoIiwicmVhc29uIl0sIm1hcHBpbmdzIjoiOzs7Ozs7O0FBQUE7O0FBQ0E7O0FBQ0E7Ozs7QUFFZSxTQUFTQSxLQUFULENBQWVDLE9BQWYsRUFBd0I7QUFDckMsTUFBSUMsY0FBS0MsR0FBTCxDQUFTRixPQUFULEVBQWtCLFlBQWxCLENBQUosRUFBcUMsT0FBT0EsT0FBUDs7QUFFckNDLGdCQUFLRSxHQUFMLENBQVNILE9BQVQsRUFBa0IsWUFBbEI7O0FBQ0EsUUFBTUksQ0FBQyxHQUFHLHdCQUFWO0FBRUFKLEVBQUFBLE9BQU8sQ0FBQ0ssT0FBUixHQUFrQkQsQ0FBQyxDQUFDQyxPQUFw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RlcmNlcHQnO1xuaW1wb3J0IG1hcmsgZnJvbSAnfi9oZWxwZXJzL21hcmsnO1xuaW1wb3J0IGRlZmVycmVkIGZyb20gJ34vY3JlYXRlL2RlZmVycmVkJztcbmltcG9ydCB7IElEZWZlcnJhYmxlIH0gZnJvbSAnfi90eXBlcyc7XG5cbmV4cG9ydCBkZWZhdWx0IGZ1bmN0aW9uIGRlZmVyPEEsIFQ+KHByb21pc2U6IEEgJiBQcm9taXNlPFQ+KSB7XG4gIGNvbnN0IHA6IEEgJiBJRGVmZXJyYWJsZSAmIFByb21pc2U8VD4gPSBwcm9taXNlIGFzIGFueTtcblxuICBpZiAobWFyay5nZXQocCwgJ2RlZmVycmFibGUnKSkgcmV0dXJuIHA7XG5cbiAgbWFyay5zZXQocHJvbWlzZSwgJ2RlZmVycmFibGUnKTtcbiAgY29uc3QgcHggPSBkZWZlcnJlZCgpO1xuXG4gIHAucmVzb2x2ZSA9IHB4LnJlc29sdmU7XG4gIHAucmVqZWN0ID0gcHgucmVqZWN0O1xuXG4gIHJldHVybiBpbnRlcmNlcHQocCwgKHB5KSA9PiB7XG4gICAgcHkudGhlbigodmFsKSA9PiBweC5yZXNvbHZlKHZhbCkpLmNhdGNoKChyZWFzb24pID0+IHB4LnJlamVjdChyZWFzb24pKTtcbiAgICByZXR1cm4gcHg7XG4gIH0pO1xufVxuIl19

@@ -15,2 +15,4 @@ "use strict";

function delay(ms, delayRejection = false) {
const init = Date.now();
const delayer = () => {

@@ -22,6 +24,5 @@ const time = Date.now() - init;

const init = Date.now();
return promise => {
return (0, _intercept.default)(promise, p => {
return p.then(val => delayer().then(() => val)).catch(err => {
return (0, _intercept.default)(promise, px => {
return px.then(val => delayer().then(() => val)).catch(err => {
return delayRejection ? delayer().then(() => Promise.reject(err)) : Promise.reject(err);

@@ -32,2 +33,2 @@ });

}
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9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sTUFBUixDQUFlRixHQUFmLENBRko7QUFHRCxPQU5JLENBQVA7QUFPRCxLQVJNLENBQVA7QUFTRCxHQVZEO0FBV0QiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgaW50ZXJjZXB0IGZyb20gJ34vaGVscGVycy9pbnRlcmNlcHQnO1xuaW1wb3J0IHdhaXQgZnJvbSAnfi9jcmVhdGUvd2FpdCc7XG5cbmV4cG9ydCBkZWZhdWx0IGZ1bmN0aW9uIGRlbGF5KG1zLCBkZWxheVJlamVjdGlvbiA9IGZhbHNlKSB7XG4gIGNvbnN0IGRlbGF5ZXIgPSAoKSA9PiB7XG4gICAgY29uc3QgdGltZSA9IERhdGUubm93KCkgLSBpbml0O1xuICAgIGNvbnN0IHJlbWFpbmluZyA9IE1hdGgubWF4KDAsIG1zIC0gdGltZSk7XG4gICAgcmV0dXJuIHdhaXQocmVtYWluaW5nKTtcbiAgfTtcblxuICBjb25zdCBpbml0ID0gRGF0ZS5ub3coKTtcbiAgcmV0dXJuIChwcm9taXNlKSA9PiB7XG4gICAgcmV0dXJuIGludGVyY2VwdChwcm9taXNlLCAocCkgPT4ge1xuICAgICAgcmV0dXJuIHBcbiAgICAgICAgLnRoZW4oKHZhbCkgPT4gZGVsYXllcigpLnRoZW4oKCkgPT4gdmFsKSlcbiAgICAgICAgLmNhdGNoKChlcnIpID0+IHtcbiAgICAgICAgICByZXR1cm4gZGVsYXlSZWplY3Rpb25cbiAgICAgICAgICAgID8gZGVsYXllcigpLnRoZW4oKCkgPT4gUHJvbWlzZS5yZWplY3QoZXJyKSlcbiAgICAgICAgICAgIDogUHJvbWlzZS5yZWplY3QoZXJyKTtcbiAgICAgICAgfSk7XG4gICAgfSk7XG4gIH07XG59XG4iXX0=
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jb21wb3NlL2RlbGF5LnRzIl0sIm5hbWVzIjpbImRlbGF5Iiwib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0FBUDtBQVNELEdBVkQ7QUFXRCIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBpbnRlcmNlcHQgZnJvbSAnfi9oZWxwZXJzL2ludGVyY2VwdCc7XG5pbXBvcnQgd2FpdCBmcm9tICd+L2NyZWF0ZS93YWl0JztcblxuZXhwb3J0IGRlZmF1bHQgZnVuY3Rpb24gZGVsYXkobXM6IG51bWJlciwgZGVsYXlSZWplY3Rpb246IGJvb2xlYW4gPSBmYWxzZSkge1xuICBjb25zdCBpbml0ID0gRGF0ZS5ub3coKTtcblxuICBjb25zdCBkZWxheWVyID0gKCk6IFByb21pc2U8dm9pZD4gPT4ge1xuICAgIGNvbnN0IHRpbWUgPSBEYXRlLm5vdygpIC0gaW5pdDtcbiAgICBjb25zdCByZW1haW5pbmcgPSBNYXRoLm1heCgwLCBtcyAtIHRpbWUpO1xuICAgIHJldHVybiB3YWl0KHJlbWFpbmluZyk7XG4gIH07XG5cbiAgcmV0dXJuIDxBLCBUPihwcm9taXNlOiBBICYgUHJvbWlzZTxUPik6IEEgJiBQcm9taXNlPFQ+ID0+IHtcbiAgICByZXR1cm4gaW50ZXJjZXB0KHByb21pc2UsIChweCkgPT4ge1xuICAgICAgcmV0dXJuIHB4XG4gICAgICAgIC50aGVuKCh2YWwpID0+IGRlbGF5ZXIoKS50aGVuKCgpID0+IHZhbCkpXG4gICAgICAgIC5jYXRjaCgoZXJyKSA9PiB7XG4gICAgICAgICAgcmV0dXJuIGRlbGF5UmVqZWN0aW9uXG4gICAgICAgICAgICA/IGRlbGF5ZXIoKS50aGVuKCgpID0+IFByb21pc2UucmVqZWN0KGVycikpXG4gICAgICAgICAgICA6IFByb21pc2UucmVqZWN0KGVycik7XG4gICAgICAgIH0pO1xuICAgIH0pO1xuICB9O1xufVxuIl19

@@ -56,2 +56,2 @@ "use strict";

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9u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mV4cG9ydCB7IGRlZmF1bHQgYXMgZGVsYXkgfSBmcm9tICcuL2RlbGF5JztcbmV4cG9ydCB7IGRlZmF1bHQgYXMgc3RhdHVzIH0gZnJvbSAnLi9zdGF0dXMnO1xuZXhwb3J0IHsgZGVmYXVsdCBhcyB0aW1lZCB9IGZyb20gJy4vdGltZWQnO1xuZXhwb3J0IHsgZGVmYXVsdCBhcyB0aW1lb3V0IH0gZnJvbSAnLi90aW1lb3V0JztcbiJdfQ==

@@ -7,3 +7,2 @@ "use strict";

exports.default = status;
exports.STATUSES = void 0;

@@ -14,27 +13,23 @@ var _intercept = _interopRequireDefault(require("../helpers/intercept"));

var _types = require("../types");
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
const STATUSES = {
PENDING: 'pending',
RESOLVED: 'resolved',
REJECTED: 'rejected'
};
exports.STATUSES = STATUSES;
function status(promise) {
if (_mark.default.get(promise, 'status')) return promise;
const p = promise;
if (_mark.default.get(p, 'status')) return p;
_mark.default.set(promise, 'status');
_mark.default.set(p, 'status');
promise.status = STATUSES.PENDING;
promise.value = null;
promise.reason = null;
return (0, _intercept.default)(promise, p => {
return p.then(val => {
promise.status = STATUSES.RESOLVED;
promise.value = val;
p.status = _types.EStatus.pending;
p.value = null;
p.reason = null;
return (0, _intercept.default)(p, px => {
return px.then(val => {
p.status = _types.EStatus.resolved;
p.value = val;
return val;
}).catch(err => {
promise.status = STATUSES.REJECTED;
promise.reason = err;
p.status = _types.EStatus.rejected;
p.reason = err;
return Promise.reject(err);

@@ -44,2 +39,2 @@ });

}
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jb21wb3NlL3N0YXR1cy5qcyJdLCJuYW1lcyI6WyJTVEFUVVNFUyIsIlBFTkRJTkciLCJSRVNPTFZFRCIsIlJFSkVDVEVEIiwic3RhdHVzIiwicHJvbWlzZSIsIm1hcmsiLCJnZXQiLCJz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jaCgoZXJyKSA9PiB7XG4gICAgICAgIHAuc3RhdHVzID0gRVN0YXR1cy5yZWplY3RlZDtcbiAgICAgICAgcC5yZWFzb24gPSBlcnI7XG4gICAgICAgIHJldHVybiBQcm9taXNlLnJlamVjdChlcnIpO1xuICAgICAgfSk7XG4gIH0pO1xufVxuIl19

@@ -15,14 +15,15 @@ "use strict";

function timed(promise) {
if (_mark.default.get(promise, 'timed')) return promise;
const p = promise;
if (_mark.default.get(p, 'timed')) return p;
_mark.default.set(promise, 'timed');
_mark.default.set(p, 'timed');
promise.time = null;
p.time = null;
const init = Date.now();
return (0, _intercept.default)(promise, p => {
return p.then(val => {
promise.time = Date.now() - init;
return (0, _intercept.default)(p, px => {
return px.then(val => {
p.time = Date.now() - init;
return val;
}).catch(err => {
promise.time = Date.now() - init;
p.time = Date.now() - init;
return Promise.reject(err);

@@ -32,2 +33,2 @@ });

}
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jb21wb3NlL3RpbWVkLmpzIl0sIm5hbWVzIjpbInRpbWVkIiwicHJvbWlzZSIsIm1hcmsiLCJnZXQiLCJzZXQiLCJ0aW1lIiwiaW5pdCIsIkRhdGUiLCJub3ciLCJwIiwidGhlbiIsInZhbCIsImNhdGNoIiwiZXJyIiwiUHJvbWlzZSIsInJlamVjdCJdLCJtYXBwaW5ncyI6Ijs7Ozs7OztBQUFBOztBQUNBOzs7O0FBRWUsU0FBU0EsS0FBVCxDQUFlQyxPQUFmLEVBQXdCO0FBQ3JDLE1BQUlDLGNBQUtDLEdBQUwsQ0FBU0YsT0FBVCxFQUFrQixPQUFsQixDQUFKLEVBQWdDLE9BQU9BLE9BQVA7O0FBQ2hDQyxnQkFBS0UsR0FBTCxDQUFTSCxPQUFULEVBQWtCLE9BQWxCOztBQUVBQSxFQUFBQSxPQUFPLENBQUNJLElBQVIsR0FBZSxJQUFmO0FBRUEsUUFBTUMsSUFB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QVM7QUFDZFosTUFBQUEsQ0FBQyxDQUFDSSxJQUFGLEdBQVNFLElBQUksQ0FBQ0MsR0FBTCxLQUFhRixJQUF0QjtBQUNBLGFBQU9RLE9BQU8sQ0FBQ0MsTUFBUixDQUFlRixHQUFmLENBQVA7QUFDRCxLQVJJLENBQVA7QUFTRCxHQVZNLENBQVA7QUFXRCIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBpbnRlcmNlcHQgZnJvbSAnfi9oZWxwZXJzL2ludGVyY2VwdCc7XG5pbXBvcnQgbWFyayBmcm9tICd+L2hlbHBlcnMvbWFyayc7XG5pbXBvcnQgeyBJVGltZWQgfSBmcm9tICd+L3R5cGVzJztcblxuZXhwb3J0IGRlZmF1bHQgZnVuY3Rpb24gdGltZWQ8QSwgVD4ocHJvbWlzZTogQSAmIFByb21pc2U8VD4pIHtcbiAgY29uc3QgcDogQSAmIElUaW1lZCAmIFByb21pc2U8VD4gPSBwcm9taXNlIGFzIGFueTtcbiAgaWYgKG1hcmsuZ2V0KHAsICd0aW1lZCcpKSByZXR1cm4gcDtcbiAgbWFyay5zZXQocCwgJ3RpbWVkJyk7XG5cbiAgcC50aW1lID0gbnVsbDtcblxuICBjb25zdCBpbml0ID0gRGF0ZS5ub3coKTtcbiAgcmV0dXJuIGludGVyY2VwdChwLCAocHgpID0+IHtcbiAgICByZXR1cm4gcHhcbiAgICAgIC50aGVuKCh2YWwpID0+IHtcbiAgICAgICAgcC50aW1lID0gRGF0ZS5ub3coKSAtIGluaXQ7XG4gICAgICAgIHJldHVybiB2YWw7XG4gICAgICB9KVxuICAgICAgLmNhdGNoKChlcnIpID0+IHtcbiAgICAgICAgcC50aW1lID0gRGF0ZS5ub3coKSAtIGluaXQ7XG4gICAgICAgIHJldHVybiBQcm9taXNlLnJlamVjdChlcnIpO1xuICAgICAgfSk7XG4gIH0pO1xufVxuIl19

@@ -19,3 +19,3 @@ "use strict";

const shouldCancel = reason === undefined || reason === false;
promise = (0, _cancellable.default)((0, _deferrable.default)(promise));
const p = (0, _cancellable.default)((0, _deferrable.default)(promise));
let done = false;

@@ -25,8 +25,8 @@ let timeout;

if (done) return;
if (shouldCancel) return promise.cancel();
if (typeof reason !== 'boolean') return promise.reject(reason);
promise.reject(Error('Promise timed out'));
if (shouldCancel) return p.cancel();
if (typeof reason !== 'boolean') return p.reject(reason);
p.reject(Error('Promise timed out'));
});
return (0, _intercept.default)(promise, p => {
return p.then(val => {
return (0, _intercept.default)(promise, px => {
return px.then(val => {
done = true;

@@ -43,2 +43,2 @@ clearTimeout(timeout);

}
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jb21wb3NlL3RpbWVvdXQuanMiXSwibmFtZXMiOlsidGltZW91dCIsIm1zIiwicmVhc29uIiwicHJvbWlzZSIsInNob3VsZENhbmNlbCIsInVuZGVmaW5lZCIsImRvbmUiLCJQcm9taXNlIiwicmVzb2x2ZSIsInNldFRpbWVvdXQiLCJ0aGVuIiwiY2FuY2VsIiwicmVqZWN0IiwiRXJyb3IiLCJwIiwidmFsIiwiY2xlYXJUaW1lb3V0IiwiY2F0Y2giLCJlcnIiXSwibWFwcGluZ3MiOiI7Ozs7Ozs7QUFBQTs7QUFDQTs7QUFDQTs7OztBQUVlLFNBQVNBLE9BQVQsQ0FBaUJDLEVBQWpCLEVBQXFCQyxNQUFyQixFQUE2QjtBQUMxQyxTQUFRQyxPQUFELElBQWE7QUFDbEIsVUFBTUMsWUFBWSxHQUFHRixNQUFNLEtBQUtHLFNBQVgsSUFBd0JILE1BQU0sS0FBSyxLQUF4RDtBQUNBQyxJQUFBQSxPQUFPLEdBQUcsMEJBQVkseUJBQVdBLE9BQVgsQ0FBWixDQUFWO0FBRUEsUUFBSUcsSUFBSSxHQUFHLEtBQVg7QUFDQSxRQUFJTixPQUFKO0FBQ0EsUUFBSU8sT0FBSixDQUFhQyxPQUFELElBQWNSLE9BQU8sR0FBR1MsVU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ltZW91dChtcywgcmVhc29uKSB7XG4gIHJldHVybiAocHJvbWlzZSkgPT4ge1xuICAgIGNvbnN0IHNob3VsZENhbmNlbCA9IHJlYXNvbiA9PT0gdW5kZWZpbmVkIHx8IHJlYXNvbiA9PT0gZmFsc2U7XG4gICAgcHJvbWlzZSA9IGNhbmNlbGxhYmxlKGRlZmVycmFibGUocHJvbWlzZSkpO1xuXG4gICAgbGV0IGRvbmUgPSBmYWxzZTtcbiAgICBsZXQgdGltZW91dDtcbiAgICBuZXcgUHJvbWlzZSgocmVzb2x2ZSkgPT4gKHRpbWVvdXQgPSBzZXRUaW1lb3V0KHJlc29sdmUsIG1zKSkpLnRoZW4oKCkgPT4ge1xuICAgICAgaWYgKGRvbmUpIHJldHVybjtcbiAgICAgIGlmIChzaG91bGRDYW5jZWwpIHJldHVybiBwcm9taXNlLmNhbmNlbCgpO1xuICAgICAgaWYgKHR5cGVvZiByZWFzb24gIT09ICdib29sZWFuJykgcmV0dXJuIHByb21pc2UucmVqZWN0KHJlYXNvbik7XG4gICAgICBwcm9taXNlLnJlamVjdChFcnJvcignUHJvbWlzZSB0aW1lZCBvdXQnKSk7XG4gICAgfSk7XG5cbiAgICByZXR1cm4gaW50ZXJjZXB0KHByb21pc2UsIChwKSA9PiB7XG4gICAgICByZXR1cm4gcFxuICAgICAgICAudGhlbigodmFsKSA9PiB7XG4gICAgICAgICAgZG9uZSA9IHRydWU7XG4gICAgICAgICAgY2xlYXJUaW1lb3V0KHRpbWVvdXQpO1xuICAgICAgICAgIHJldHVybiB2YWw7XG4gICAgICAgIH0pXG4gICAgICAgIC5jYXRjaCgoZXJyKSA9PiB7XG4gICAgICAgICAgZG9uZSA9IHRydWU7XG4gICAgICAgICAgY2xlYXJUaW1lb3V0KHRpbWVvdXQpO1xuICAgICAgICAgIHJldHVybiBQcm9taXNlLnJlamVjdChlcnIpO1xuICAgICAgICB9KTtcbiAgICB9KTtcbiAgfTtcbn1cbiJdfQ==
//# sourceMappingURL=data:application/json;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AgIGxldCB0aW1lb3V0OiBhbnk7XG4gICAgbmV3IFByb21pc2UoKHJlc29sdmUpID0+ICh0aW1lb3V0ID0gc2V0VGltZW91dChyZXNvbHZlLCBtcykpKS50aGVuKCgpID0+IHtcbiAgICAgIGlmIChkb25lKSByZXR1cm47XG4gICAgICBpZiAoc2hvdWxkQ2FuY2VsKSByZXR1cm4gcC5jYW5jZWwoKTtcbiAgICAgIGlmICh0eXBlb2YgcmVhc29uICE9PSAnYm9vbGVhbicpIHJldHVybiBwLnJlamVjdChyZWFzb24gYXMgRXJyb3IpO1xuICAgICAgcC5yZWplY3QoRXJyb3IoJ1Byb21pc2UgdGltZWQgb3V0JykpO1xuICAgIH0pO1xuXG4gICAgcmV0dXJuIGludGVyY2VwdChwcm9taXNlLCAocHgpID0+IHtcbiAgICAgIHJldHVybiBweFxuICAgICAgICAudGhlbigodmFsKSA9PiB7XG4gICAgICAgICAgZG9uZSA9IHRydWU7XG4gICAgICAgICAgY2xlYXJUaW1lb3V0KHRpbWVvdXQpO1xuICAgICAgICAgIHJldHVybiB2YWw7XG4gICAgICAgIH0pXG4gICAgICAgIC5jYXRjaCgoZXJyKSA9PiB7XG4gICAgICAgICAgZG9uZSA9IHRydWU7XG4gICAgICAgICAgY2xlYXJUaW1lb3V0KHRpbWVvdXQpO1xuICAgICAgICAgIHJldHVybiBQcm9taXNlLnJlamVjdChlcnIpO1xuICAgICAgICB9KTtcbiAgICB9KTtcbiAgfTtcbn1cbiJdfQ==

@@ -13,4 +13,6 @@ "use strict";

function deferred() {
let _resolve, _reject;
let _resolve;
let _reject;
const p = new Promise((resolve, reject) => {

@@ -27,2 +29,2 @@ _resolve = resolve;

}
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jcmVhdGUvZGVmZXJyZWQuanMiXSwibmFtZXMiOlsiZGVmZXJyZWQiLCJfcmVzb2x2ZSIsIl9yZWplY3QiLCJwIi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Bhbnk7XG5cbiAgbWFyay5zZXQocCwgJ2RlZmVycmFibGUnKTtcbiAgcC5yZXNvbHZlID0gX3Jlc29sdmU7XG4gIHAucmVqZWN0ID0gX3JlamVjdDtcbiAgcmV0dXJuIHA7XG59XG4iXX0=

@@ -11,2 +11,2 @@ "use strict";

}
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jcmVhdGUvaW1tZWRpYXRlLmpzIl0sIm5hbWVzIjpbImltbWVkaWF0ZSIsIlByb21pc2UiLCJyZXNvbHZlIiwic2V0SW1tZWRpYXRlIl0sIm1hcHBpbmdzIjoiOzs7Ozs7O0FBQWUsU0FBU0EsU0FBVCxHQUFxQjtBQUNsQyxTQUFPLElBQUlDLE9BQUosQ0FBYUMsT0FBRCxJQUFhQyxZQUFZLENBQUNELE9BQUQsQ0FBckMsQ0FBUDtBQUNEIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IGRlZmF1bHQgZnVuY3Rpb24gaW1tZWRpYXRlKCkge1xuICByZXR1cm4gbmV3IFByb21pc2UoKHJlc29sdmUpID0+IHNldEltbWVkaWF0ZShyZXNvbHZlKSk7XG59XG4iXX0=
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jcmVhdGUvaW1tZWRpYXRlLnRzIl0sIm5hbWVzIjpbImltbWVkaWF0ZSIsIlByb21pc2UiLCJyZXNvbHZlIiwic2V0SW1tZWRpYXRlIl0sIm1hcHBpbmdzIjoiOzs7Ozs7O0FBQWUsU0FBU0EsU0FBVCxHQUFvQztBQUNqRCxTQUFPLElBQUlDLE9BQUosQ0FBYUMsT0FBRCxJQUFhQyxZQUFZLENBQUNELE9BQUQsQ0FBckMsQ0FBUDtBQUNEIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IGRlZmF1bHQgZnVuY3Rpb24gaW1tZWRpYXRlKCk6IFByb21pc2U8dm9pZD4ge1xuICByZXR1cm4gbmV3IFByb21pc2UoKHJlc29sdmUpID0+IHNldEltbWVkaWF0ZShyZXNvbHZlKSk7XG59XG4iXX0=

@@ -48,2 +48,2 @@ "use strict";

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jcmVhdGUvaW5kZXguanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O0FBQUE7O0FBQ0E7O0FBQ0E7O0FBQ0E7O0FBQ0EiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgeyBkZWZhdWx0IGFzIGRlZmVycmVkIH0gZnJvbSAnLi9kZWZlcnJlZCc7XG5leHBvcnQgeyBkZWZhdWx0IGFzIGltbWVkaWF0ZSB9IGZyb20gJy4vaW1tZWRpYXRlJztcbmV4cG9ydCB7IGRlZmF1bHQgYXMgbGF6eSB9IGZyb20gJy4vbGF6eSc7XG5leHBvcnQgeyBkZWZhdWx0IGFzIHdhaXQgfSBmcm9tICcuL3dhaXQnO1xuZXhwb3J0IHsgZGVmYXVsdCBhcyB3YWl0VW50aWwgfSBmcm9tICcuL3dhaXQtdW50aWwnO1xuIl19
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jcmVhdGUvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O0FBQUE7O0FBQ0E7O0FBQ0E7O0FBQ0E7O0FBQ0EiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgeyBkZWZhdWx0I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W55PiA9IG5ldyBQcm9taXNlKChyZXNvbHZlKSA9PiByZXNvbHZlKCkpO1xuXG4gIGxldCBwOiBQcm9taXNlPGFueT47XG4gIHJldHVybiBpbnRlcmNlcHQocHJvbWlzZSwgKCkgPT4ge1xuICAgIHJldHVybiBwIHx8IChwID0gbmV3IFByb21pc2UoZXhlY3V0b3IpKTtcbiAgfSk7XG59XG4iXX0=

@@ -19,4 +19,4 @@ "use strict";

return callCb();
return callCb().then(() => {});
}
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jcmVhdGUvd2FpdC11bnRpbC5qcyJdLCJuYW1lcyI6WyJ3YWl0VW50aWwiLCJ0ZXN0Q2IiLCJtcyIsImNhbGxDYiIsIlByb21pc2UiLCJyZXNvbHZlIiwidGhlbiIsImFucyJdLCJtYXBwaW5ncyI6Ijs7Ozs7OztBQUFBOzs7O0FBRWUsU0FBU0EsU0FBVCxDQUFtQkMsTUFBbkIsRUFBMkJDLEVBQUUsR0FBRyxFQUFoQyxFQUFvQztBQUNqRCxRQUFNQyxNQUFNLEdBQUcsTUFBTTtBQUNuQixXQUFPQyxPQUFPLENBQUNDLE9BQVIsQ0FBZ0JKLE1BQU0sRUFBdEIsRUFBMEJLLElBQTFCLENBQWdDQyxHQUFELElBQVM7QUFDN0MsYUFBT0EsR0FBRyxJQUFJLG1CQUFLTCxFQUFMLEVBQVNJLElBQVQsQ0FBYyxNQUFNSCxNQUFNLEVBQTFCLENBQWQ7QUFDRCxLQUZNLENBQVA7QUFHRCxHQUpEOztBQU1BLFNBQU9BLE1BQU0sRUFBYjtBQUNEIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHdhaXQgZnJvbSAnLi93YWl0JztcblxuZXhwb3J0IGRlZmF1bHQgZnVuY3Rpb24gd2FpdFVudGlsKHRlc3RDYiwgbXMgPSAyMCkge1xuICBjb25zdCBjYWxsQ2IgPSAoKSA9PiB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yID0gMjBcbik6IFByb21pc2U8dm9pZD4ge1xuICBjb25zdCBjYWxsQ2IgPSAoKTogUHJvbWlzZTxhbnk+ID0+IHtcbiAgICByZXR1cm4gUHJvbWlzZS5yZXNvbHZlKHRlc3RDYigpKS50aGVuKChhbnMpID0+IHtcbiAgICAgIHJldHVybiBhbnMgfHwgd2FpdChtcykudGhlbigoKSA9PiBjYWxsQ2IoKSk7XG4gICAgfSk7XG4gIH07XG5cbiAgcmV0dXJuIGNhbGxDYigpLnRoZW4oKCkgPT4ge30pO1xufVxuIl19

@@ -11,2 +11,2 @@ "use strict";

}
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jcmVhdGUvd2FpdC5qcyJdLCJuYW1lcyI6WyJ3YWl0IiwibXMiLCJQcm9taXNlIiwicmVzb2x2ZSIsInNldFRpbWVvdXQiXSwibWFwcGluZ3MiOiI7Ozs7Ozs7QUFBZSxTQUFTQSxJQUFULENBQWNDLEVBQWQsRUFBa0I7QUFDL0IsU0FBTyxJQUFJQyxPQUFKLENBQWFDLE9BQUQsSUFBYUMsVUFBVSxDQUFDRCxPQUFELEVBQVVGLEVBQVYsQ0FBbkMsQ0FBUDtBQUNEIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IGRlZmF1bHQgZnVuY3Rpb24gd2FpdChtcykge1xuICByZXR1cm4gbmV3IFByb21pc2UoKHJlc29sdmUpID0+IHNldFRpbWVvdXQocmVzb2x2ZSwgbXMpKTtcbn1cbiJdfQ==
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jcmVhdGUvd2FpdC50cyJdLCJuYW1lcyI6WyJ3YWl0IiwibXMiLCJQcm9taXNlIiwicmVzb2x2ZSIsInNldFRpbWVvdXQiXSwibWFwcGluZ3MiOiI7Ozs7Ozs7QUFBZSxTQUFTQSxJQUFULENBQWNDLEVBQWQsRUFBeUM7QUFDdEQsU0FBTyxJQUFJQyxPQUFKLENBQWFDLE9BQUQsSUFBYUMsVUFBVSxDQUFDRCxPQUFELEVBQVVGLEVBQVYsQ0FBbkMsQ0FBUDtBQUNEIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IGRlZmF1bHQgZnVuY3Rpb24gd2FpdChtczogbnVtYmVyKTogUHJvbWlzZTx2b2lkPiB7XG4gIHJldHVybiBuZXcgUHJvbWlzZSgocmVzb2x2ZSkgPT4gc2V0VGltZW91dChyZXNvbHZlLCBtcykpO1xufVxuIl19

@@ -11,6 +11,7 @@ "use strict";

function intercept(promise, interceptFn) {
let intercept = promise[INTERCEPT_SYMBOL];
const p = promise;
let intercept = p[INTERCEPT_SYMBOL];
if (intercept) {
promise[RESPONSE_SYMBOL] = null;
p[RESPONSE_SYMBOL] = null;
intercept.push(interceptFn);

@@ -20,9 +21,8 @@ return promise;

intercept = [interceptFn];
promise[INTERCEPT_SYMBOL] = intercept;
p[INTERCEPT_SYMBOL] = intercept = [interceptFn];
const _then = promise.then;
const run = () => {
const res = promise[RESPONSE_SYMBOL];
return res || (promise[RESPONSE_SYMBOL] = intercept.reduce((acc, fn) => fn(acc), Promise.resolve(_then.call(promise, x => x))));
const res = p[RESPONSE_SYMBOL];
return res || (p[RESPONSE_SYMBOL] = intercept.reduce((acc, fn) => fn(acc), Promise.resolve(_then.call(promise, x => x))));
};

@@ -34,6 +34,8 @@

promise.finally = (...args) => run().finally(...args);
if (promise.hasOwnProperty('finally')) {
promise.finally = (...args) => run().finally(...args);
}
return promise;
}
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9oZWxwZXJzL2ludGVyY2VwdC5qcyJdLCJuYW1lcyI6WyJJTlRFUkNFUFRfU1lNQk9MIiwiU3ltYm9sIiwiUkVTUE9OU0VfU1lNQk9MIiwiaW50ZXJjZXB0Iiwic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FUkNFUFRfU1lNQk9MXSA9IGludGVyY2VwdDtcbiAgY29uc3QgX3RoZW4gPSBwcm9taXNlLnRoZW47XG4gIGNvbnN0IHJ1biA9ICgpID0+IHtcbiAgICBjb25zdCByZXMgPSBwcm9taXNlW1JFU1BPTlNFX1NZTUJPTF07XG4gICAgcmV0dXJuIChcbiAgICAgIHJlcyB8fFxuICAgICAgKHByb21pc2VbUkVTUE9OU0VfU1lNQk9MXSA9IGludGVyY2VwdC5yZWR1Y2UoXG4gICAgICAgIChhY2MsIGZuKSA9PiBmbihhY2MpLFxuICAgICAgICBQcm9taXNlLnJlc29sdmUoX3RoZW4uY2FsbChwcm9taXNlLCAoeCkgPT4geCkpXG4gICAgICApKVxuICAgICk7XG4gIH07XG5cbiAgcHJvbWlzZS50aGVuID0gKC4uLmFyZ3MpID0+IHJ1bigpLnRoZW4oLi4uYXJncyk7XG4gIHByb21pc2UuY2F0Y2ggPSAoLi4uYXJncykgPT4gcnVuKCkuY2F0Y2goLi4uYXJncyk7XG4gIHByb21pc2UuZmluYWxseSA9ICguLi5hcmdzKSA9PiBydW4oKS5maW5hbGx5KC4uLmFyZ3MpO1xuXG4gIHJldHVybiBwcm9taXNlO1xufVxuIl19
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9oZWxwZXJzL2ludGVyY2VwdC50cyJdLCJuYW1lcyI6WyJJTlRFUkNFUFRfU1lNQk9MIiwiU3ltYm9sIiwiUkVTUE9OU0VfU1lNQk9MIiwiaW50ZXJjZXB0IiwicHJvbWlzZSIsImludGVyY2VwdEZuIiwicCIsInB1c2giLCJfdGhlbiIsInRoZW4iLCJydW4iLCJyZXMiLCJyZWR1Y2UiLCJhY2MiLCJmbiIsIlByb21pc2UiLCJyZXNvbHZlIiwiY2FsbCIsIngiLCJhcmdzIiwiY2F0Y2giLCJoYXNPd25Qcm9wZXJ0eSIsImZpbmFsbHkiXSwibWFwcG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JTlRFUkNFUFRfU1lNQk9MXSA9IGludGVyY2VwdCA9IFtpbnRlcmNlcHRGbl07XG4gIGNvbnN0IF90aGVuID0gcHJvbWlzZS50aGVuO1xuICBjb25zdCBydW4gPSAoKSA9PiB7XG4gICAgY29uc3QgcmVzID0gcFtSRVNQT05TRV9TWU1CT0xdO1xuICAgIHJldHVybiAoXG4gICAgICByZXMgfHxcbiAgICAgIChwW1JFU1BPTlNFX1NZTUJPTF0gPSBpbnRlcmNlcHQucmVkdWNlKFxuICAgICAgICAoYWNjOiBQcm9taXNlPGFueT4sIGZuKSA9PiBmbihhY2MpLFxuICAgICAgICBQcm9taXNlLnJlc29sdmUoX3RoZW4uY2FsbChwcm9taXNlLCAoeDogYW55KSA9PiB4KSlcbiAgICAgICkpXG4gICAgKTtcbiAgfTtcblxuICBwcm9taXNlLnRoZW4gPSAoLi4uYXJncykgPT4gcnVuKCkudGhlbiguLi5hcmdzKTtcbiAgcHJvbWlzZS5jYXRjaCA9ICguLi5hcmdzKSA9PiBydW4oKS5jYXRjaCguLi5hcmdzKTtcbiAgaWYgKHByb21pc2UuaGFzT3duUHJvcGVydHkoJ2ZpbmFsbHknKSkge1xuICAgIHByb21pc2UuZmluYWxseSA9ICguLi5hcmdzKSA9PiBydW4oKS5maW5hbGx5KC4uLmFyZ3MpO1xuICB9XG5cbiAgcmV0dXJuIHByb21pc2U7XG59XG4iXX0=

@@ -20,3 +20,8 @@ "use strict";

set(promise, ...as) {
if (!promise[MARK_SYMBOL]) promise[MARK_SYMBOL] = getDefaults();
if (!promise.hasOwnProperty(MARK_SYMBOL)) {
Object.assign(promise, {
[MARK_SYMBOL]: getDefaults()
});
}
as.forEach(key => promise[MARK_SYMBOL][key] = true);

@@ -27,3 +32,3 @@ return promise;

get(promise, as) {
return !!(promise[MARK_SYMBOL] && promise[MARK_SYMBOL][as]);
return Boolean(promise.hasOwnProperty(MARK_SYMBOL) && promise[MARK_SYMBOL][as]);
}

@@ -33,2 +38,2 @@

exports.default =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UQsT0FBTyxDQUFDSCxXQUFELENBQVAsSUFBd0JHLE9BQU8sQ0FBQ0gsV0FBRCxDQUFQLENBQXFCSSxFQUFyQixDQUExQixDQUFSO0FBQ0Q7O0FBVlksQyIsInNvdXJjZXNDb250ZW50IjpbImNvbnN0IGdldERlZmF1bHRzID0gKCkgPT4gKHtcbiAgY2FuY2VsbGFibGU6IGZhbHNlLFxuICByZXNldGFibGU6IGZhbHNlLFxuICBkZWZlcnJhYmxlOiBmYWxzZSxcbiAgdGltZWQ6IGZhbHNlLFxuICBzdGF0dXM6IGZhbHNlXG59KTtcblxuZXhwb3J0IGNvbnN0IE1BUktfU1lNQk9MID0gU3ltYm9sKCdtYXJrJyk7XG5leHBvcnQgZGVmYXVsdCB7XG4gIHNldChwcm9taXNlLCAuLi5hcykge1xuICAgIGlmICghcHJvbWlzZVtNQVJLX1NZTUJPTF0pIHByb21pc2VbTUFSS19TWU1CT0xdID0gZ2V0RGVmYXVsdHMoKTtcblxuICAgIGFzLmZvckVhY2goKGtleSkgPT4gKHByb21pc2VbTUFSS19TWU1CT0xdW2tleV0gPSB0cnVlKSk7XG5cbiAgICByZXR1cm4gcHJvbWlzZTtcbiAgfSxcbiAgZ2V0KHByb21pc2UsIGFzKSB7XG4gICAgcmV0dXJuICEhKHByb21pc2VbTUFSS19TWU1CT0xdICYmIHByb21pc2VbTUFSS19TWU1CT0xdW2FzXSk7XG4gIH1cbn07XG4iXX0=
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9oZWxwZXJzL21hcmsudHMiXSwibmFtZXMiOlsiZ2V0RGVmYXVsdHMiLCJjYW5jZWxsYWJsZSIsInJlc2V0YWJsZSIsImRlZmVycmFibGUiLCJ0aW1lZCIsInN0YXR1cyIsIk1BUktfU1lNQk9MIiwiU3ltYm9sIiwic2V0IiwicHJvbWlzZSIsImFzIiwiaGFzT3duUHJvcGVydHkiLCJPYmplY3Q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ZW50IjpbImNvbnN0IGdldERlZmF1bHRzID0gKCkgPT4gKHtcbiAgY2FuY2VsbGFibGU6IGZhbHNlLFxuICByZXNldGFibGU6IGZhbHNlLFxuICBkZWZlcnJhYmxlOiBmYWxzZSxcbiAgdGltZWQ6IGZhbHNlLFxuICBzdGF0dXM6IGZhbHNlXG59KTtcblxuZXhwb3J0IGNvbnN0IE1BUktfU1lNQk9MID0gU3ltYm9sKCdtYXJrJyk7XG5cbmV4cG9ydCBkZWZhdWx0IHtcbiAgc2V0PEEsIFQ+KHByb21pc2U6IEEgJiBQcm9taXNlPFQ+LCAuLi5hczogc3RyaW5nW10pOiBBIHtcbiAgICBpZiAoIXByb21pc2UuaGFzT3duUHJvcGVydHkoTUFSS19TWU1CT0wpKSB7XG4gICAgICBPYmplY3QuYXNzaWduKHByb21pc2UsIHsgW01BUktfU1lNQk9MXTogZ2V0RGVmYXVsdHMoKSB9KTtcbiAgICB9XG5cbiAgICBhcy5mb3JFYWNoKChrZXkpID0+ICgocHJvbWlzZSBhcyBhbnkpW01BUktfU1lNQk9MXVtrZXldID0gdHJ1ZSkpO1xuXG4gICAgcmV0dXJuIHByb21pc2U7XG4gIH0sXG4gIGdldDxUPihwcm9taXNlOiBQcm9taXNlPFQ+LCBhczogc3RyaW5nKTogYm9vbGVhbiB7XG4gICAgcmV0dXJuIEJvb2xlYW4oXG4gICAgICBwcm9taXNlLmhhc093blByb3BlcnR5KE1BUktfU1lNQk9MKSAmJiAocHJvbWlzZSBhcyBhbnkpW01BUktfU1lNQk9MXVthc11cbiAgICApO1xuICB9XG59O1xuIl19

@@ -67,2 +67,2 @@ "use strict";

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9pbmRleC5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7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cm9tICcuL2NvbXBvc2UnO1xuZXhwb3J0ICogZnJvbSAnLi91dGlscyc7XG5leHBvcnQgeyBkZWZhdWx0IGFzIHNlcmllcyB9IGZyb20gJy4vc2VyaWVzJztcbmV4cG9ydCB7IGRlZmF1bHQgYXMgcGFyYWxsZWwgfSBmcm9tICcuL3BhcmFsbGVsJztcbiJdfQ==
{
"name": "promist",
"version": "0.5.2",
"version": "0.5.3",
"author": "Rafa Mel",

@@ -20,8 +20,15 @@ "description": "A dependable Promises and async utility belt",

"scripts": {
"preversion": "nps private.preversion",
"version": "nps private.version",
"start": "npm run watch",
"build": "nps build",
"build:prepare": "nps build.prepare",
"build:transpile": "nps build.transpile",
"build:declaration": "nps build.declaration",
"watch": "nps watch",
"fix": "nps fix",
"fix:format": "nps fix.format",
"fix:md": "nps fix.md",
"types": "nps types",
"lint": "nps lint",
"lint:test": "nps lint.test",
"lint:md": "nps lint.md",

@@ -32,9 +39,10 @@ "lint:scripts": "nps lint.scripts",

"validate": "nps validate",
"docs": "nps docs",
"changelog": "nps changelog",
"update": "nps update",
"clean": "nps clean",
"docs": "nps docs",
"nps": "nps",
"jake": "jake"
"jake": "jake",
"commit": "cross-env COMMITIZEN=# git-cz"
},
"types": "./typings/index.d.ts",
"license": "MIT",

@@ -51,24 +59,30 @@ "homepage": "https://github.com/rafamel/promist",

"@babel/cli": "^7.0.0",
"@babel/core": "^7.2.2",
"@babel/plugin-proposal-class-properties": "^7.0.0",
"@babel/core": "^7.3.3",
"@babel/plugin-proposal-class-properties": "^7.3.3",
"@babel/plugin-proposal-decorators": "^7.2.2",
"@babel/plugin-proposal-object-rest-spread": "^7.0.0",
"@babel/plugin-proposal-object-rest-spread": "^7.3.2",
"@babel/preset-env": "^7.0.0",
"@babel/preset-typescript": "^7.1.0",
"@types/jest": "^23.3.9",
"babel-core": "^7.0.0-bridge.0",
"@babel/preset-typescript": "^7.3.3",
"@types/jest": "^24.0.6",
"@typescript-eslint/eslint-plugin": "^1.4.1",
"@typescript-eslint/parser": "^1.4.1",
"@zerollup/ts-transform-paths": "^1.7.0",
"babel-eslint": "^10.0.1",
"babel-jest": "^23.4.2",
"babel-plugin-module-resolver": "^3.1.1",
"babel-jest": "^24.1.0",
"babel-plugin-module-resolver": "^3.2.0",
"commitizen": "^3.0.7",
"concurrently": "^4.1.0",
"coveralls": "^3.0.2",
"conventional-changelog-cli": "^2.0.12",
"conventional-recommended-bump": "^4.0.4",
"coveralls": "^3.0.3",
"cross-env": "^5.2.0",
"eslint": "^5.9.0",
"eslint-config-prettier": "^3.3.0",
"cz-conventional-changelog": "^2.1.0",
"eslint": "^5.14.1",
"eslint-config-prettier": "^4.0.0",
"eslint-config-standard": "^12.0.0",
"eslint-import-resolver-babel-module": "^5.0.0-beta.1",
"eslint-import-resolver-babel-module": "^5.0.1",
"eslint-import-resolver-typescript": "^1.1.1",
"eslint-plugin-babel": "^5.3.0",
"eslint-plugin-import": "^2.14.0",
"eslint-plugin-jest": "^22.0.0",
"eslint-plugin-import": "^2.16.0",
"eslint-plugin-jest": "^22.3.0",
"eslint-plugin-node": "^8.0.0",

@@ -79,33 +93,27 @@ "eslint-plugin-prettier": "^3.0.0",

"eslint-restricted-globals": "^0.2.0",
"husky": "^1.2.1",
"husky": "1.3.0",
"jake": "^8.0.19",
"jest-cli": "^23.6.0",
"jest-cli": "^24.1.0",
"markdown-spellcheck": "^1.3.1",
"markdownlint-cli": "^0.13.0",
"nps": "^5.9.3",
"nps": "^5.9.4",
"onchange": "^5.2.0",
"prettier": "^1.15.2",
"prettier": "^1.16.4",
"shx": "^0.3.2",
"tslint": "^5.12.0",
"tslint-config-prettier": "^1.17.0",
"typedoc": "^0.13.0",
"typedoc-plugin-external-module-name": "^1.1.3",
"typescript": "^3.2.4"
"ttypescript": "^1.5.6",
"typedoc": "^0.14.2",
"typescript": "^3.3.3333"
},
"dependencies": {},
"jest": {
"testEnvironment": "node",
"collectCoverage": true,
"collectCoverageFrom": [
"<rootDir>/src/**/*.{js,mjs,jsx,ts,tsx}"
],
"modulePathIgnorePatterns": [
"<rootDir>/build"
]
},
"husky": {
"hooks": {
"pre-commit": "cross-env MSG=\"Committing in:\" nps validate"
"pre-commit": "cross-env COMMIT=# nps validate"
}
},
"config": {
"commitizen": {
"path": "cz-conventional-changelog"
}
},
"main": "./index.js"
}

@@ -25,3 +25,3 @@ "use strict";

function reduce(arr, cb, initialValue) {
function reduce(arr, fn, initialValue) {
return Promise.all(arr).then(resArr => {

@@ -31,4 +31,4 @@ return resArr.slice(1).reduce((acc, x, i) => {

acc.then(val => p.resolve(val)).catch(err => p.reject(err));
return cb(p, x, i + 1, resArr);
}, initialValue === undefined ? Promise.resolve(resArr[0]) : Promise.resolve(cb(Promise.resolve(initialValue), resArr[0], 0, resArr)));
return fn(p, x, i + 1, resArr);
}, initialValue === undefined ? Promise.resolve(resArr[0]) : Promise.resolve(fn(Promise.resolve(initialValue), resArr[0], 0, resArr)));
});

@@ -48,2 +48,2 @@ }

exports.default = _default;
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9wYXJhbGxlbC5qcyJdLCJuYW1lcyI6WyJtYXAiLCJhcnIiLCJmbiIsIlByb21pc2UiLCJhbGwiLCJ0aGVuIiwicmVzQXJyIiwiZmlsdGVyIiwiZmlsdGVyVmFsIiwieCIsImkiLCJyZXNvbHZlIiwiYW5zIiwicmVkdWNlIiwiY2IiLCJpbml0aWFsVmFsdWUiLCJzbGljZSIsImFjYyIsInAiLCJ2YWwiLCJjYXRjaCIsImVyciIsInJlamVjdCIsInVuZGVmaW5lZCIsImVhY2giXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7O0FBQUE7Ozs7QUFFTyxTQUFTQSxHQUFULENBQWFDLEdBQWIsRUFBa0JDLEVBQWxCLEVBQXNCO0FBQzNCLFNBQU9DLE9BQU8sQ0FBQ0MsR0FBUixDQUFZSCxHQUFaLEVBQWlCSSxJQUFqQixDQUF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ikge1xuICByZXR1cm4gUHJvbWlzZS5hbGwoYXJyKS50aGVuKChyZXNBcnIpID0+IFByb21pc2UuYWxsKHJlc0Fyci5tYXAoZm4pKSk7XG59XG5cbmV4cG9ydCBmdW5jdGlvbiBmaWx0ZXIoYXJyLCBmbikge1xuICBjb25zdCBmaWx0ZXJWYWwgPSB7fTtcblxuICByZXR1cm4gUHJvbWlzZS5hbGwoYXJyKVxuICAgIC50aGVuKChyZXNBcnIpID0+XG4gICAgICBQcm9taXNlLmFsbChcbiAgICAgICAgcmVzQXJyLm1hcCgoeCwgaSkgPT5cbiAgICAgICAgICBQcm9taXNlLnJlc29sdmUoZm4oeCwgaSwgcmVzQXJyKSkudGhlbigoYW5zKSA9PiAoYW5zID8geCA6IGZpbHRlclZhbCkpXG4gICAgICAgIClcbiAgICAgIClcbiAgICApXG4gICAgLnRoZW4oKGFycikgPT4gYXJyLmZpbHRlcigoeCkgPT4geCAhPT0gZmlsdGVyVmFsKSk7XG59XG5cbmV4cG9ydCBmdW5jdGlvbiByZWR1Y2UoYXJyLCBjYiwgaW5pdGlhbFZhbHVlKSB7XG4gIHJldHVybiBQcm9taXNlLmFsbChhcnIpLnRoZW4oKHJlc0FycikgPT4ge1xuICAgIHJldHVybiByZXNBcnIuc2xpY2UoMSkucmVkdWNlKFxuICAgICAgKGFjYywgeCwgaSkgPT4ge1xuICAgICAgICBjb25zdCBwID0gZGVmZXJyZWQoKTtcbiAgICAgICAgYWNjLnRoZW4oKHZhbCkgPT4gcC5yZXNvbHZlKHZhbCkpLmNhdGNoKChlcnIpID0+IHAucmVqZWN0KGVycikpO1xuICAgICAgICByZXR1cm4gY2IocCwgeCwgaSArIDEsIHJlc0Fycik7XG4gICAgICB9LFxuICAgICAgaW5pdGlhbFZhbHVlID09PSB1bmRlZmluZWRcbiAgICAgICAgPyBQcm9taXNlLnJlc29sdmUocmVzQXJyWzBdKVxuICAgICAgICA6IFByb21pc2UucmVzb2x2ZShcbiAgICAgICAgICAgIGNiKFBy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nJheTxQcm9taXNlPFQ+IHwgVD4sXG4gIGZuOiAodmFsdWU6IFQsIGluZGV4OiBudW1iZXIsIGFycjogVFtdKSA9PiBQcm9taXNlPGFueT4gfCBhbnlcbik6IFByb21pc2U8YW55W10+IHtcbiAgY29uc3QgZmlsdGVyVmFsID0ge307XG5cbiAgcmV0dXJuIFByb21pc2UuYWxsKGFycilcbiAgICAudGhlbigocmVzQXJyKSA9PlxuICAgICAgUHJvbWlzZS5hbGwoXG4gICAgICAgIHJlc0Fyci5tYXAoKHgsIGkpID0+XG4gICAgICAgICAgUHJvbWlzZS5yZXNvbHZlKGZuKHgsIGksIHJlc0FycikpLnRoZW4oKGFucykgPT4gKGFucyA/IHggOiBmaWx0ZXJWYWwpKVxuICAgICAgICApXG4gICAgICApXG4gICAgKVxuICAgIC50aGVuKChhcnIpID0+IGFyci5maWx0ZXIoKHgpID0+IHggIT09IGZpbHRlclZhbCkpO1xufVxuXG5leHBvcnQgZnVuY3Rpb24gcmVkdWNlPFQ+KFxuICBhcnI6IEFycmF5PFByb21pc2U8VD4gfCBUPixcbiAgZm46IChcbiAgICBhY2N1bXVsYXRvcjogUHJvbWlzZTxhbnk+LFxuICAgIHZhbHVlOiBULFxuICAgIGluZGV4OiBudW1iZXIsXG4gICAgYXJyOiBUW11cbiAgKSA9PiBQcm9taXNlPGFueT4gfCBhbnksXG4gIGluaXRpYWxWYWx1ZT86IFByb21pc2U8YW55PiB8IGFueVxuKTogUHJvbWlzZTxhbnk+IHtcbiAgcmV0dXJuIFByb21pc2UuYWxsKGFycikudGhlbigocmVzQXJyKSA9PiB7XG4gICAgcmV0dXJuIHJlc0Fyci5zbGljZSgxKS5yZWR1Y2UoXG4gICAgICAoYWNjLCB4LCBpKSA9PiB7XG4gICAgICAgIGNvbnN0IHAgPSBkZWZlcnJlZCgpO1xuICAgICAgICBhY2MudGhlbigodmFsKSA9PiBwLnJlc29sdmUodmFsKSkuY2F0Y2goKGVycikgPT4gcC5yZWplY3QoZXJyKSk7XG4gICAgICAgIHJldHVybiBmbihwLCB4LCBpICsgMSwgcmVzQXJyKTtcbiAgICAgIH0sXG4gICAgICBpbml0aWFsVmFsdWUgPT09IHVuZGVmaW5lZFxuICAgICAgICA/IFByb21pc2UucmVzb2x2ZShyZXNBcnJbMF0pXG4gICAgICAgIDogUHJvbWlzZS5yZXNvbHZlKFxuICAgICAgICAgICAgZm4oUHJvbWlzZS5yZXNvbHZlKGluaXRpYWxWYWx1ZSksIHJlc0FyclswXSwgMCwgcmVzQXJyKVxuICAgICAgICAgIClcbiAgICApO1xuICB9KTtcbn1cblxuZXhwb3J0IGZ1bmN0aW9uIGVhY2g8VD4oXG4gIGFycjogQXJyYXk8UHJvbWlzZTxUPiB8IFQ+LFxuICBmbjogKHZhbHVlOiBULCBpbmRleDogbnVtYmVyLCBhcnI6IFRbXSkgPT4gYW55XG4pOiBQcm9taXNlPHZvaWQ+IHtcbiAgcmV0dXJuIG1hcChhcnIsIGZuKS50aGVuKCgpID0+IHt9KTtcbn1cblxuZXhwb3J0IGRlZmF1bHQge1xuICBtYXAsXG4gIGZpbHRlcixcbiAgcmVkdWNlLFxuICBlYWNoXG59O1xuIl19
# Promist
[![Version](https://img.shields.io/npm/v/promist.svg)](https://www.npmjs.com/package/promist)
[![Build Status](https://travis-ci.org/rafamel/promist.svg)](https://travis-ci.org/rafamel/promist)
[![Build Status](https://img.shields.io/travis/rafamel/promist.svg)](https://travis-ci.org/rafamel/promist)
[![Coverage](https://img.shields.io/coveralls/rafamel/promist.svg)](https://coveralls.io/github/rafamel/promist)
[![Dependencies](https://david-dm.org/rafamel/promist/status.svg)](https://david-dm.org/rafamel/promist)
[![Vulnerabilities](https://snyk.io/test/npm/promist/badge.svg)](https://snyk.io/test/npm/promist)
[![Issues](https://img.shields.io/github/issues/rafamel/promist.svg)](https://github.com/rafamel/promist/issues)
[![Dependencies](https://img.shields.io/david/rafamel/promist.svg)](https://david-dm.org/rafamel/promist)
[![Vulnerabilities](https://img.shields.io/snyk/vulnerabilities/npm/promist.svg)](https://snyk.io/test/npm/promist)
[![License](https://img.shields.io/github/license/rafamel/promist.svg)](https://github.com/rafamel/promist/blob/master/LICENSE)
[![Types](https://img.shields.io/npm/types/exits.svg)](https://www.npmjs.com/package/exits)

@@ -138,3 +138,3 @@ <!-- markdownlint-disable MD036 -->

* They might not work adecuately if you're using non-standard methods for resolution other than `promise.then()`, `promise.catch()`, or `promise.finally()`.
* They might not work adequately if you're using non-standard methods for resolution other than `promise.then()`, `promise.catch()`, or `promise.finally()`.
* They can be chained via [`compose()`.](#composefns-function)

@@ -148,3 +148,3 @@

If the input `promise` resolves or rejects before `promise.resolve()` or `promise.reject()` are called, they won't have any effect. If the opposite ocurrs, the resolution or rejection value of the input promise will be discarded.
If the input `promise` resolves or rejects before `promise.resolve()` or `promise.reject()` are called, they won't have any effect. If the opposite occurs, the resolution or rejection value of the input promise will be discarded.

@@ -268,7 +268,8 @@ ```javascript

function* gen(n) {
// You can use yield as you'd use await; res = 20
// You can use yield as you'd use await
let res = yield Promise.resolve(n * 2);
// If tasks have been triggered by some event this won't execute
// test() will be called here,
// if it returns falsy or throws an error this next line won't execute
res = yield Promise.resolve(res * 5);
// res = 100
return res;

@@ -275,0 +276,0 @@ }

@@ -12,23 +12,23 @@ "use strict";

function map(arr, cb) {
function map(arr, fn) {
const ans = [];
return arr.reduce((acc, x, i) => {
return acc.then(() => x).then(val => cb(val, i, arr)).then(res => ans.push(res));
return acc.then(() => x).then(val => fn(val, i, arr)).then(res => ans.push(res));
}, Promise.resolve()).then(() => ans);
}
function filter(arr, cb) {
function filter(arr, fn) {
const ans = [];
return arr.reduce((acc, x, i) => {
return acc.then(() => x).then(val => Promise.resolve(cb(val, i, arr)).then(res => res && ans.push(val)));
return acc.then(() => x).then(val => Promise.resolve(fn(val, i, arr)).then(res => res && ans.push(val)));
}, Promise.resolve()).then(() => ans);
}
function reduce(arr, cb, initialValue) {
return arr.slice(1).reduce((acc, x, i) => acc.then(val => Promise.resolve(x).then(x => cb(val, x, i + 1, arr))), initialValue === undefined ? Promise.resolve(arr[0]) : Promise.resolve(initialValue).then(val => Promise.resolve(arr[0]).then(x => cb(val, x, 0, arr))));
function reduce(arr, fn, initialValue) {
return arr.slice(1).reduce((acc, x, i) => acc.then(val => Promise.resolve(x).then(x => fn(val, x, i + 1, arr))), initialValue === undefined ? Promise.resolve(arr[0]) : Promise.resolve(initialValue).then(val => Promise.resolve(arr[0]).then(x => fn(val, x, 0, arr))));
}
function each(arr, cb) {
function each(arr, fn) {
return arr.reduce((acc, x, i) => {
return acc.then(() => x).then(val => cb(val, i, arr));
return acc.then(() => x).then(val => fn(val, i, arr));
}, Promise.resolve()).then(() => {});

@@ -44,2 +44,2 @@ }

exports.default = _default;
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9zZXJpZXMuanMiXSwibmFtZXMiOlsibWFwIiwiYXJyIiwiY2IiLCJhbnMiLCJyZWR1Y2UiLCJhY2MiLCJ4IiwiaSIsInRoZW4iLCJ2YWwiLCJyZXMiLCJwdXNoIiwiUHJvbWlzZSIsInJlc29sdmUiLCJmaWx0ZXIiLCJpbml0aWFsVmFsdWUiLCJzbGljZSIsInVuZGVmaW5lZCIsImVhY2giXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7O0FBQU8sU0FBU0EsR0FBVCxDQUFhQyxHQUFiLEVBQWtCQyxFQUFsQixFQUFzQjtBQUMzQixRQUFNQyxHQUFHLEdBQUcsRUFBWjtBQUVBLFNBQU9GLEdBQUcsQ0FDUEcsTUFESSxDQUNHLENBQUNDLEdBQUQsRUFBTUMsQ0FBTixFQUFTQyxDQUFULEtBQWU7QUFDckIsV0FBT0YsR0FBRyxDQUNQRyxJQURJLENBQ0MsTUFBTUYsQ0FEUCxFQUVKRSxJQUZJLENBRUVDLEdBQUQsSUFBU1AsRUFBRSxDQUFDTyxHQUFELEVBQU1GLENBQU4sRUFBU04s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xhbnk+IHwgYW55XG4pOiBQcm9taXNlPGFueVtdPiB7XG4gIGNvbnN0IGFuczogYW55W10gPSBbXTtcblxuICByZXR1cm4gYXJyXG4gICAgLnJlZHVjZSgoYWNjOiBQcm9taXNlPGFueT4sIHgsIGkpID0+IHtcbiAgICAgIHJldHVybiBhY2NcbiAgICAgICAgLnRoZW4oKCkgPT4geClcbiAgICAgICAgLnRoZW4oKHZhbCkgPT5cbiAgICAgICAgICBQcm9taXNlLnJlc29sdmUoZm4odmFsLCBpLCBhcnIpKS50aGVuKChyZXMpID0+IHJlcyAmJiBhbnMucHVzaCh2YWwpKVxuICAgICAgICApO1xuICAgIH0sIFByb21pc2UucmVzb2x2ZSgpKVxuICAgIC50aGVuKCgpID0+IGFucyk7XG59XG5cbmV4cG9ydCBmdW5jdGlvbiByZWR1Y2U8VD4oXG4gIGFycjogQXJyYXk8UHJvbWlzZTxUPiB8IFQ+LFxuICBmbjogKFxuICAgIGFjY3VtdWxhdG9yOiBhbnksXG4gICAgdmFsdWU6IFQsXG4gICAgaW5kZXg6IG51bWJlcixcbiAgICBhcnI6IEFycmF5PFByb21pc2U8VD4gfCBUPlxuICApID0+IFByb21pc2U8YW55PiB8IGFueSxcbiAgaW5pdGlhbFZhbHVlPzogUHJvbWlzZTxhbnk+IHwgYW55XG4pOiBQcm9taXNlPGFueT4ge1xuICByZXR1cm4gYXJyXG4gICAgLnNsaWNlKDEpXG4gICAgLnJlZHVjZShcbiAgICAgIChhY2MsIHgsIGkpID0+XG4gICAgICAgIGFjYy50aGVuKCh2YWwpID0+XG4gICAgICAgICAgUHJvbWlzZS5yZXNvbHZlKHgpLnRoZW4oKHgpID0+IGZuKHZhbCwgeCwgaSArIDEsIGFycikpXG4gICAgICAgICksXG4gICAgICBpbml0aWFsVmFsdWUgPT09IHVuZGVmaW5lZFxuICAgICAgICA/IFByb21pc2UucmVzb2x2ZShhcnJbMF0pXG4gICAgICAgIDogUHJvbWlzZS5yZXNvbHZlKGluaXRpYWxWYWx1ZSkudGhlbigodmFsKSA9PlxuICAgICAgICAgICAgUHJvbWlzZS5yZXNvbHZlKGFyclswXSkudGhlbigoeCkgPT4gZm4odmFsLCB4LCAwLCBhcnIpKVxuICAgICAgICAgIClcbiAgICApO1xufVxuXG5leHBvcnQgZnVuY3Rpb24gZWFjaDxUPihcbiAgYXJyOiBBcnJheTxQcm9taXNlPFQ+IHwgVD4sXG4gIGZuOiAodmFsdWU6IFQsIGluZGV4OiBudW1iZXIsIGFycjogQXJyYXk8UHJvbWlzZTxUPiB8IFQ+KSA9PiBhbnlcbik6IFByb21pc2U8dm9pZD4ge1xuICByZXR1cm4gYXJyXG4gICAgLnJlZHVjZSgoYWNjLCB4LCBpKSA9PiB7XG4gICAgICByZXR1cm4gYWNjLnRoZW4oKCkgPT4geCkudGhlbigodmFsKSA9PiBmbih2YWwsIGksIGFycikpO1xuICAgIH0sIFByb21pc2UucmVzb2x2ZSgpKVxuICAgIC50aGVuKCgpID0+IHt9KTtcbn1cblxuZXhwb3J0IGRlZmF1bHQge1xuICBtYXAsXG4gIGZpbHRlcixcbiAgcmVkdWNlLFxuICBlYWNoXG59O1xuIl19

@@ -13,2 +13,2 @@ "use strict";

}
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy91dGlscy9jb21wb3NlLmpzIl0sIm5hbWVzIjpbImNvbXBvc2UiLCJmbnMiLCJsZW5ndGgiLCJhcmciLCJyZWR1Y2UiLCJhIiwiYiIsImFyZ3MiXSwibWFwcGluZ3MiOiI7Ozs7Ozs7QUFBZSxTQUFTQSxPQUFULENBQWlCLEdBQUdDLEdBQXBCLEVBQXlCO0FBQ3RDLE1BQUlBLEdBQUcsQ0FBQ0MsTUFBSixLQUFlLENBQW5CLEVBQXNCLE9BQVFDLEdBQUQsSUFBU0EsR0FBaEI7QUFDdEIsTUFBSUYsR0FBRyxDQUFDQyxNQUFKLEtBQWUsQ0FBbkIs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BQUosS0FBYUYsQ0FBQyxDQUFDQyxDQUFDLENBQUMsR0FBR0MsSUFBSixDQUFGLENBQW5DLENBQVA7QUFDRCIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCBkZWZhdWx0IGZ1bmN0aW9uIGNvbXBvc2UoLi4uZm5zOiBBcnJheTwodmFsdWU6IGFueSkgPT4gYW55Pikge1xuICBpZiAoZm5zLmxlbmd0aCA9PT0gMCkgcmV0dXJuIChhcmc6IGFueSkgPT4gYXJnO1xuICBpZiAoZm5zLmxlbmd0aCA9PT0gMSkgcmV0dXJuIGZuc1swXTtcblxuICByZXR1cm4gZm5zLnJlZHVjZSgoYSwgYikgPT4gKC4uLmFyZ3MpID0+IGEoYiguLi5hcmdzKSkpO1xufVxuIl19

@@ -6,5 +6,5 @@ "use strict";

});
exports.default = generate;
exports.default = control;
function generate(test, generator) {
function control(test, generator) {
return async (...args) => {

@@ -26,2 +26,2 @@ const iterator = generator(...args);

}
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy91dGlscy9jb250cm9sLmpzIl0sIm5hbWVzIjpbImdlbmVyYXRlIiwidGVzdCIsImdlbmVyYXRvciIsImFyZ3MiLCJpdGVyYXRvciIsInZhbHVlIiwiZG9uZSIsInRlc3RSZXMiLCJFcnJvciIsIm5leHQiLCJQcm9taXNlIl0sIm1hcHBpbmdzIjoiOzs7Ozs7O0FBQWUsU0FBU0EsUUFBVCxDQUFrQkMsSUFBbEIsRUFBd0JDLFNBQXhCLEVBQW1DO0FBQ2hELFNBQU8sT0FBTyxHQUFHQyxJQUFWLEtBQW1CO0FBQ3hCLFVBQU1DLFFBQVEsR0FBR0YsU0FBUyxDQUFDLEdBQUdDLElBQUosQ0FBMUI7QUFDQSxRQUFJRSxLQUFKO0FBQ0EsUUFBSUMsSUFBSjtBQUVBLFFBQUlDLE9BQUo7O0FBQ0EsV0FBTyxDQUFDRCxJQUFELEtB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xHQWREO0FBZUQiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgZGVmYXVsdCBmdW5jdGlvbiBjb250cm9sPFQsIEEgZXh0ZW5kcyBhbnlbXT4oXG4gIHRlc3Q6ICgpID0+IFByb21pc2U8Ym9vbGVhbiB8IEVycm9yPiB8IGJvb2xlYW4gfCBFcnJvcixcbiAgZ2VuZXJhdG9yOlxuICAgIHwgKCguLi5hcmdzOiBBKSA9PiBJdGVyYWJsZUl0ZXJhdG9yPFByb21pc2U8VD4+KVxuICAgIHwgKCguLi5hcmdzOiBBKSA9PiBJdGVyYWJsZUl0ZXJhdG9yPFQ+KVxuKSB7XG4gIHJldHVybiBhc3luYyAoLi4uYXJnczogQSk6IFByb21pc2U8VD4gPT4ge1xuICAgIGNvbnN0IGl0ZXJhdG9yID0gZ2VuZXJhdG9yKC4uLmFyZ3MpO1xuICAgIGxldCB2YWx1ZTtcbiAgICBsZXQgZG9uZTtcblxuICAgIGxldCB0ZXN0UmVzO1xuICAgIHdoaWxlICghZG9uZSAmJiAodGVzdFJlcyA9IGF3YWl0IHRlc3QoKSkgJiYgISh0ZXN0UmVzIGluc3RhbmNlb2YgRXJyb3IpKSB7XG4gICAgICBjb25zdCBuZXh0OiBhbnkgPSBpdGVyYXRvci5uZXh0KGF3YWl0IHZhbHVlKTtcbiAgICAgIHZhbHVlID0gbmV4dC52YWx1ZTtcbiAgICAgIGRvbmUgPSBuZXh0LmRvbmU7XG4gICAgfVxuXG4gICAgaWYgKHRlc3RSZXMgaW5zdGFuY2VvZiBFcnJvcikgdGhyb3cgdGVzdFJlcztcbiAgICByZXR1cm4gdGVzdFJlcyA/IHZhbHVlIDogbmV3IFByb21pc2UoKCkgPT4ge30pO1xuICB9O1xufVxuIl19

@@ -32,2 +32,2 @@ "use strict";

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy91dGlscy9pbmRleC5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFBQTs7QUFDQTs7QUFDQSIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCB7IGRlZmF1bHQgYXMgY29tcG9zZSB9IGZyb20gJy4vY29tcG9zZSc7XG5leHBvcnQgeyBkZWZhdWx0IGFzIGNvbnRyb2wgfSBmcm9tICcuL2NvbnRyb2wnO1xuZXhwb3J0IHsgZGVmYXVsdCBhcyBpc1Byb21pc2UgfSBmcm9tICcuL2lzLXByb21pc2UnO1xuIl19
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy91dGlscy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFBQTs7QUFDQTs7QUFDQSIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCB7IGRlZmF1bHQgYXMgY29tcG9zZSB9IGZyb20gJy4vY29tcG9zZSc7XG5leHBvcnQgeyBkZWZhdWx0IGFzIGNvbnRyb2wgfSBmcm9tICcuL2NvbnRyb2wnO1xuZXhwb3J0IHsgZGVmYXVsdCBhcyBpc1Byb21pc2UgfSBmcm9tICcuL2lzLXByb21pc2UnO1xuIl19

@@ -9,4 +9,4 @@ "use strict";

function isPromise(obj) {
return !!(obj && (typeof obj === 'object' || typeof obj === 'function') && typeof obj.then === 'function');
return Boolean(obj && (typeof obj === 'object' || typeof obj === 'function') && typeof obj.then === 'function');
}
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy91dGlscy9pcy1wcm9taXNlLmpzIl0sIm5hbWVzIjpbImlzUHJvbWlzZSIsIm9iaiIsInRoZW4iXSwib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2JqICYmXG4gICAgICAodHlwZW9mIG9iaiA9PT0gJ29iamVjdCcgfHwgdHlwZW9mIG9iaiA9PT0gJ2Z1bmN0aW9uJykgJiZcbiAgICAgIHR5cGVvZiBvYmoudGhlbiA9PT0gJ2Z1bmN0aW9uJ1xuICApO1xufVxuIl19
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc