@whitesev/utils 2.9.0 → 2.9.1
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/index.amd.js +16 -1
- package/dist/index.amd.js.map +1 -1
- package/dist/index.amd.min.js +1 -1
- package/dist/index.amd.min.js.map +1 -1
- package/dist/index.cjs.js +16 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.cjs.min.js +1 -1
- package/dist/index.cjs.min.js.map +1 -1
- package/dist/index.esm.js +16 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/index.esm.min.js +1 -1
- package/dist/index.esm.min.js.map +1 -1
- package/dist/index.iife.js +16 -1
- package/dist/index.iife.js.map +1 -1
- package/dist/index.iife.min.js +1 -1
- package/dist/index.iife.min.js.map +1 -1
- package/dist/index.system.js +16 -1
- package/dist/index.system.js.map +1 -1
- package/dist/index.system.min.js +1 -1
- package/dist/index.system.min.js.map +1 -1
- package/dist/index.umd.js +16 -1
- package/dist/index.umd.js.map +1 -1
- package/dist/index.umd.min.js +1 -1
- package/dist/index.umd.min.js.map +1 -1
- package/dist/types/src/Utils.d.ts +31 -0
- package/dist/types/src/types/ajaxHooker.d.ts +3 -1
- package/package.json +8 -11
- package/src/Utils.ts +49 -0
- package/src/types/ajaxHooker.d.ts +3 -1
package/dist/index.system.js
CHANGED
|
@@ -5477,7 +5477,7 @@ System.register('Utils', [], (function (exports) {
|
|
|
5477
5477
|
}
|
|
5478
5478
|
const domUtils = new DOMUtils();
|
|
5479
5479
|
|
|
5480
|
-
const version = "2.9.
|
|
5480
|
+
const version = "2.9.1";
|
|
5481
5481
|
|
|
5482
5482
|
class Utils {
|
|
5483
5483
|
windowApi;
|
|
@@ -8195,6 +8195,21 @@ System.register('Utils', [], (function (exports) {
|
|
|
8195
8195
|
this.windowApi.clearInterval(timeId);
|
|
8196
8196
|
}
|
|
8197
8197
|
}
|
|
8198
|
+
createFunction(...args) {
|
|
8199
|
+
let isAsync = args[args.length - 1];
|
|
8200
|
+
if (typeof isAsync !== "boolean") {
|
|
8201
|
+
isAsync = false;
|
|
8202
|
+
}
|
|
8203
|
+
args.splice(args.length - 1, 1);
|
|
8204
|
+
if (isAsync) {
|
|
8205
|
+
const AsyncFunctionConstructor = Object.getPrototypeOf(async function () { }).constructor;
|
|
8206
|
+
return new AsyncFunctionConstructor(...args);
|
|
8207
|
+
}
|
|
8208
|
+
else {
|
|
8209
|
+
const FunctionConstructor = Object.getPrototypeOf(function () { }).constructor;
|
|
8210
|
+
return new FunctionConstructor(...args);
|
|
8211
|
+
}
|
|
8212
|
+
}
|
|
8198
8213
|
}
|
|
8199
8214
|
const utils = exports("default", new Utils());
|
|
8200
8215
|
|