@creejs/commons-lang 2.1.13 → 2.1.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index-dev.cjs +30 -5
- package/dist/cjs/index-dev.cjs.map +1 -1
- package/dist/cjs/index-min.cjs +1 -1
- package/dist/cjs/index-min.cjs.map +1 -1
- package/dist/esm/index-dev.js +30 -5
- package/dist/esm/index-dev.js.map +1 -1
- package/dist/esm/index-min.js +1 -1
- package/dist/esm/index-min.js.map +1 -1
- package/dist/umd/index.dev.js +30 -5
- package/dist/umd/index.dev.js.map +1 -1
- package/dist/umd/index.min.js +1 -1
- package/dist/umd/index.min.js.map +1 -1
- package/package.json +1 -1
- package/types/exec-utils.d.ts +30 -2
package/dist/cjs/index-dev.cjs
CHANGED
|
@@ -1357,11 +1357,34 @@ function substringsBetween (str, startMarker, endMarker) {
|
|
|
1357
1357
|
}
|
|
1358
1358
|
|
|
1359
1359
|
/**
|
|
1360
|
-
*
|
|
1360
|
+
* @module ExecUtils
|
|
1361
|
+
* @description Utils about how to execute task functions.
|
|
1362
|
+
*/
|
|
1363
|
+
|
|
1364
|
+
|
|
1365
|
+
/**
|
|
1366
|
+
* @typedef {{
|
|
1367
|
+
* error: (...args:any[]) => void,
|
|
1368
|
+
* warn: (...args:any[]) => void,
|
|
1369
|
+
* info: (...args:any[]) => void,
|
|
1370
|
+
* debug: (...args:any[]) => void,
|
|
1371
|
+
* trace: (...args:any[]) => void,
|
|
1372
|
+
* isErrorEnabled: () => boolean,
|
|
1373
|
+
* isWarnEnabled: () => boolean,
|
|
1374
|
+
* isInfoEnabled: () => boolean,
|
|
1375
|
+
* isDebugEnabled: () => boolean,
|
|
1376
|
+
* isTraceEnabled: () => boolean,
|
|
1377
|
+
* }} LoggerLike
|
|
1378
|
+
*/
|
|
1379
|
+
|
|
1380
|
+
/**
|
|
1381
|
+
* 1. Executes a task silently, suppressing any errors or rejections.
|
|
1382
|
+
* 2. if loggerLike is provided, will log the error via it
|
|
1361
1383
|
* @param {Function} task - The export function to execute.
|
|
1384
|
+
* @param {LoggerLike} loggerLike - The logger-like object to use for logging.
|
|
1362
1385
|
* @returns {Promise<*>|*} The return value of the task, or a Promise if the task is asynchronous.
|
|
1363
1386
|
*/
|
|
1364
|
-
function quiet (task) {
|
|
1387
|
+
function quiet (task, loggerLike) {
|
|
1365
1388
|
assertFunction(task);
|
|
1366
1389
|
try {
|
|
1367
1390
|
const rtnVal = task();
|
|
@@ -1737,6 +1760,7 @@ async function parallelAllSettled (tasks, maxParallel = 5) {
|
|
|
1737
1760
|
|
|
1738
1761
|
// owned
|
|
1739
1762
|
|
|
1763
|
+
// module vars
|
|
1740
1764
|
const { isPlainObject } = TypeUtils;
|
|
1741
1765
|
|
|
1742
1766
|
/**
|
|
@@ -1801,6 +1825,8 @@ function newProxyInstance (cls, args, propertyHandler, sealed = true) {
|
|
|
1801
1825
|
return Reflect.construct(proxyCls, args ?? [])
|
|
1802
1826
|
}
|
|
1803
1827
|
|
|
1828
|
+
// owned
|
|
1829
|
+
|
|
1804
1830
|
/**
|
|
1805
1831
|
* @module InstanceProxyUtils
|
|
1806
1832
|
*/
|
|
@@ -1827,7 +1853,6 @@ var InstanceProxyUtils = {
|
|
|
1827
1853
|
|
|
1828
1854
|
// owned
|
|
1829
1855
|
|
|
1830
|
-
|
|
1831
1856
|
/**
|
|
1832
1857
|
* Retrieves all unique method names from a class's prototype chain. *
|
|
1833
1858
|
* @param {Function} cls - The class to inspect
|
|
@@ -1904,8 +1929,6 @@ var ReflectUtils = {
|
|
|
1904
1929
|
};
|
|
1905
1930
|
|
|
1906
1931
|
// internal
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
1932
|
// owned
|
|
1910
1933
|
|
|
1911
1934
|
/**
|
|
@@ -1989,6 +2012,8 @@ function equals$1 (src, target) {
|
|
|
1989
2012
|
return true
|
|
1990
2013
|
}
|
|
1991
2014
|
|
|
2015
|
+
// owned
|
|
2016
|
+
|
|
1992
2017
|
var ArrayBufferUtils = {
|
|
1993
2018
|
readString,
|
|
1994
2019
|
writeString,
|