@whitesev/utils 2.9.0 → 2.9.2

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.
@@ -5477,7 +5477,7 @@ System.register('Utils', [], (function (exports) {
5477
5477
  }
5478
5478
  const domUtils = new DOMUtils();
5479
5479
 
5480
- const version = "2.9.0";
5480
+ const version = "2.9.2";
5481
5481
 
5482
5482
  class Utils {
5483
5483
  windowApi;
@@ -8195,6 +8195,23 @@ 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
+ args.splice(args.length - 1, 1);
8202
+ }
8203
+ else {
8204
+ isAsync = false;
8205
+ }
8206
+ if (isAsync) {
8207
+ const AsyncFunctionConstructor = Object.getPrototypeOf(async function () { }).constructor;
8208
+ return new AsyncFunctionConstructor(...args);
8209
+ }
8210
+ else {
8211
+ const FunctionConstructor = Object.getPrototypeOf(function () { }).constructor;
8212
+ return new FunctionConstructor(...args);
8213
+ }
8214
+ }
8198
8215
  }
8199
8216
  const utils = exports("default", new Utils());
8200
8217