@meteor-it/utils
Advanced tools
Comparing version 1.3.29 to 1.3.30
@@ -384,3 +384,3 @@ "use strict"; | ||
if (repeat !== 0 && timeMultiplier != 1) { | ||
repeatIn = Math.min(repeatIn * timeMultiplier, maxTime ?? Infinity); | ||
repeatIn = Math.min(repeatIn * timeMultiplier, (maxTime !== null && maxTime !== void 0 ? maxTime : Infinity)); | ||
} | ||
@@ -426,2 +426,2 @@ await sleep(repeatIn); | ||
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInhyZXN0L25vZGVfbW9kdWxlcy9AbWV0ZW9yLWl0L3V0aWxzL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQUEsbUNBQWtDO0FBRWxDLHFDQUFxQztBQUNyQyxTQUFnQixnQkFBZ0IsQ0FBQyxNQUFjLEVBQUUsT0FBTyxHQUFHLEVBQUU7SUFDekQsT0FBTyxJQUFJLFdBQVcsQ0FBQyxNQUFNLEVBQUUsT0FBTyxDQUFDLENBQUM7QUFDNUMsQ0FBQztBQUZELDRDQUVDO0FBRUQscUNBQXFDO0FBQ3JDLFNBQWdCLGtCQUFrQixDQUFDLE1BQWdCLEVBQUUsVUFBa0IsQ0FBQztJQUNwRSxPQUFPLElBQUksT0FBTyxDQUFDLENBQUMsR0FBRyxFQUFFLEdBQUcsRUFBRSxFQUFFO1FBQzVCLE1BQU0sSUFBSSxHQUFRLEVBQUUsQ0FBQztRQUNyQixJQUFJLElBQUksR0FBRyxDQUFDLENBQUM7UUFDYixNQUFNLENBQUMsRUFBRSxDQUFDLE1BQU0sRUFBRSxDQUFDLENBQUMsRUFBRTtZQUNsQixJQUFJLElBQUksR0FBRyxDQUFDLENBQUMsTUFBTSxHQUFHLE9BQU8sRUFBRTtnQkFDM0IsR0FBRyxDQUFDLElBQUksS0FBSyxDQUFDLDBCQUEwQixDQUFDLENBQUMsQ0FBQztnQkFDM0MsT0FBTzthQUNWO1lBQ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1xuICAgIH1cbiAgICBpZiAoeCBpbnN0YW5jZW9mIEZ1bmN0aW9uKSB7XG4gICAgICAgIHJldHVybiB4ID09PSB5O1xuICAgIH1cbiAgICBpZiAoeCBpbnN0YW5jZW9mIFJlZ0V4cCkge1xuICAgICAgICByZXR1cm4geC5zb3VyY2UgPT09IHkuc291cmNlICYmIHguc291cmNlID09PSB5LnNvdXJjZTtcbiAgICB9XG4gICAgaWYgKHggPT09IHkgfHwgeC52YWx1ZU9mKCkgPT09IHkudmFsdWVPZigpKSB7XG4gICAgICAgIHJldHVybiB0cnVlO1xuICAgIH1cbiAgICBpZiAoeCBpbnN0YW5jZW9mIE1hcCkge1xuICAgICAgICBpZiAoeC5zaXplICE9PSB5LnNpemUpXG4gICAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgIGlmICghb2JqZWN0RXF1YWxzKFsuLi54LmtleXMoKV0uc29ydCgpLCBbLi4ueS5rZXlzKCldLnNvcnQoKSkpXG4gICAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgIGlmICghb2JqZWN0RXF1YWxzKFsuLi54LnZhbHVlcygpXS5zb3J0KCksIFsuLi55LnZhbHVlcygpXS5zb3J0KCkpKVxuICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICB9XG4gICAgaWYgKHggaW5zdGFuY2VvZiBTZXQpIHtcbiAgICAgICAgaWYgKHguc2l6ZSAhPT0geS5zaXplKVxuICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICBpZiAoIW9iamVjdEVxdWFscyhbLi4ueC52YWx1ZXMoKV0uc29ydCgpLCBbLi4ueS52YWx1ZXMoKV0uc29ydCgpKSlcbiAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgcmV0dXJuIHRydWU7XG4gICAgfVxuICAgIGlmIChBcnJheS5pc0FycmF5KHgpICYmIHgubGVuZ3RoICE9PSB5Lmxlbmd0aCkge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JyYXkyOiBhbnlbXSB8IE9iamVjdCk6IGFueSB7XG4gICAgbGV0IG91dDogYW55O1xuICAgIGlmIChhcnJheTEgaW5zdGFuY2VvZiBBcnJheSkge1xuICAgICAgICBvdXQgPSBbXTtcbiAgICAgICAgZm9yIChsZXQgaW5kZXggaW4gYXJyYXkxKSB7XG4gICAgICAgICAgICBvdXQucHVzaChbYXJyYXkxW2luZGV4XSwgKGFycmF5MiBhcyBhbnkpW2luZGV4XV0pO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBvdXQ7XG4gICAgfSBlbHNlIHtcbiAgICAgICAgb3V0ID0ge307XG4gICAgICAgIGZvciAobGV0IGtleSBpbiBhcnJheTEpIHtcbiAgICAgICAgICAgIC8vIG5vaW5zcGVjdGlvbiBKU1VuZmlsdGVyZWRGb3JJbkxvb3BcbiAgICAgICAgICAgIG91dFtrZXldID0gKGFycmF5MSBhcyBhbnkpW2tleV07XG4gICAgICAgIH1cbiAgICAgICAgZm9yIChsZXQga2V5IGluIGFycmF5Mikge1xuICAgICAgICAgICAgLy8gbm9pbnNwZWN0aW9uIEpTVW5maWx0ZXJlZEZvckluTG9vcFxuICAgICAgICAgICAgb3V0W2tleV0gPSAoYXJyYXkyIGFzIGFueSlba2V5XTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gb3V0O1xuICAgIH1cbn1cblxuLyoqXG4gKiBAZGVwcmVjYXRlZFxuICogQHBhcmFtIHZhbHVlc1xuICovXG5leHBvcnQgZnVuY3Rpb24gY3JlYXRlUHJpdmF0ZUVudW0oLi4udmFsdWVzOiBzdHJpbmdbXSk6IHsgW2tleTogc3RyaW5nXTogU3ltYm9sIH0ge1xuICAgIGxldCByZXR1cm5PYmo6IGFueSA9IHt9O1xuICAgIHZhbHVlcy5tYXAodmFsdWUgPT4gdmFsdWUudG9VcHBlckNhc2UoKSk7XG4gICAgdmFsdWVzLmZvckVhY2godmFsdWUgPT4gcmV0dXJuT2JqW3ZhbHVlXSA9IFN5bWJv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OiB2b2lkIHtcbiAgICAgICAgdGhpcy5saXN0ZW5lcnNPbmNlci5wdXNoKGxpc3RlbmVyKTtcbiAgICB9XG5cbiAgICBvZmYobGlzdGVuZXI6IExpc3RlbmVyPFQ+KSB7XG4gICAgICAgIHZhciBjYWxsYmFja0luZGV4ID0gdGhpcy5saXN0ZW5lcnMuaW5kZXhPZihsaXN0ZW5lcik7XG4gICAgICAgIGlmIChjYWxsYmFja0luZGV4ID4gLTEpIHRoaXMubGlzdGVuZXJzLnNwbGljZShjYWxsYmFja0luZGV4LCAxKTtcbiAgICB9XG5cbiAgICBlbWl0KGV2ZW50OiBUKSB7XG4gICAgICAgIHRoaXMubGlzdGVuZXJzLmZvckVhY2goKGxpc3RlbmVyKSA9PiBsaXN0ZW5lcihldmVudCkpO1xuICAgICAgICBpZiAodGhpcy5saXN0ZW5lcnNPbmNlci5sZW5ndGggPiAwKSB7XG4gICAgICAgICAgICBjb25zdCB0b0NhbGwgPSB0aGlzLmxpc3RlbmVyc09uY2VyO1xuICAgICAgICAgICAgdGhpcy5saXN0ZW5lcnNPbmNlciA9IFtdO1xuICAgICAgICAgICAgdG9DYWxsLmZvckVhY2goKGxpc3RlbmVyKSA9PiBsaXN0ZW5lcihldmVudCkpO1xuICAgICAgICB9XG4gICAgfVxuICAgIHBpcGUodGU6IFR5cGVkRXZlbnQ8VD4pOiBEaXNwb3NhYmxlIHtcbiAgICAgICAgcmV0dXJuIHRoaXMub24oKGUpID0+IHRlLmVtaXQoZSkpO1xuICAgIH1cbn1cbiJdfQ== | ||
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInhyZXN0L25vZGVfbW9kdWxlcy9AbWV0ZW9yLWl0L3V0aWxzL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQUEsbUNBQWtDO0FBRWxDLHFDQUFxQztBQUNyQyxTQUFnQixnQkFBZ0IsQ0FBQyxNQUFjLE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krKykge1xuICAgICAgICBjb25zdCB2YWx1ZSA9IGFycmF5W2ldO1xuXG4gICAgICAgIGlmIChBcnJheS5pc0FycmF5KHZhbHVlKSkge1xuICAgICAgICAgICAgZmxhdHRlbih2YWx1ZSwgcmVzdWx0KTtcbiAgICAgICAgfVxuICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgIHJlc3VsdC5wdXNoKHZhbHVlKTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIHJldHVybiByZXN1bHQ7XG59XG5cbi8qKlxuICogQGRlcHJlY2F0ZWRcbiAqIEBwYXJhbSBhcnJheVxuICovXG5leHBvcnQgZnVuY3Rpb24gcmVtb3ZlRHVwbGljYXRlczxUPihhcnJheTogVFtdKTogVFtdIHtcbiAgICByZXR1cm4gQXJyYXkuZnJvbShuZXcgU2V0KGFycmF5KSk7XG59XG5cbi8qKlxuICogQGRlcHJlY2F0ZWRcbiAqIEBwYXJhbSBhcnJheTFcbiAqIEBwYXJhbSBhcnJheTJcbiAqL1xuZXhwb3J0IGZ1bmN0aW9uIG1peChhcnJheTE6IGFueVtdIHwgT2JqZWN0LCBhcnJheTI6IGFueVtdIHwgT2JqZWN0KTogYW55IHtcbiAgICBsZXQgb3V0OiBhbnk7XG4gICAgaWYgKGFycmF5MSBpbnN0YW5jZW9mIEFycmF5KSB7XG4gICAgICAgIG91dCA9IFtdO1xuICAgICAgICBmb3IgKGxldCBpbmRleCBpbiBhcnJheTEpIHtcbiAgICAgICAgICAgIG91dC5wdXNoKFthcnJheTFbaW5kZXhdLCAoYXJyYXkyIGFzIGFueSlbaW5kZXhdXSk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG91dDtcbiAgICB9IGVsc2Uge1xuICAgICAgICBvdXQgPSB7fTtcbiAgICAgICAgZm9yIChsZXQga2V5IGluIGFycmF5MSkge1xuICAgICAgICAgICAgLy8gbm9pbnNwZWN0aW9uIEpTVW5maWx0ZXJlZEZvckluTG9vcFxuICAgICAgICAgICAgb3V0W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0aGlzLmxpc3RlbmVyc09uY2VyLmxlbmd0aCA+IDApIHtcbiAgICAgICAgICAgIGNvbnN0IHRvQ2FsbCA9IHRoaXMubGlzdGVuZXJzT25jZXI7XG4gICAgICAgICAgICB0aGlzLmxpc3RlbmVyc09uY2VyID0gW107XG4gICAgICAgICAgICB0b0NhbGwuZm9yRWFjaCgobGlzdGVuZXIpID0+IGxpc3RlbmVyKGV2ZW50KSk7XG4gICAgICAgIH1cbiAgICB9XG4gICAgcGlwZSh0ZTogVHlwZWRFdmVudDxUPik6IERpc3Bvc2FibGUge1xuICAgICAgICByZXR1cm4gdGhpcy5vbigoZSkgPT4gdGUuZW1pdChlKSk7XG4gICAgfVxufVxuIl19 |
{ | ||
"name": "@meteor-it/utils", | ||
"version": "1.3.29", | ||
"version": "1.3.30", | ||
"description": "Many useful utils", | ||
@@ -17,3 +17,3 @@ "module": "index.mjs", | ||
}, | ||
"gitHead": "45ae37da49e836f0d90dc0a0a395e500fc2f6f1b" | ||
"gitHead": "cda559fa64ae21db0878e514cdea0db6061d3fb4" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
102784
1589