@tsed/cli-core 3.20.6 → 3.20.9

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/lib/index.js CHANGED
@@ -3752,6 +3752,30 @@ exports.CliCore = CliCore_1 = tslib.__decorate([di.Module({
3752
3752
  imports: [CliPackageJson, exports.ProjectPackageJson, exports.CliService, exports.CliConfiguration]
3753
3753
  })], exports.CliCore);
3754
3754
 
3755
+ function at(n) {
3756
+ // ToInteger() abstract op
3757
+ n = Math.trunc(n) || 0; // Allow negative indexing from the end
3758
+
3759
+ if (n < 0) n += this.length; // OOB access is guaranteed to return undefined
3760
+
3761
+ if (n < 0 || n >= this.length) return undefined; // Otherwise, this is just normal property access
3762
+
3763
+ return this[n];
3764
+ }
3765
+
3766
+ const TypedArray = Reflect.getPrototypeOf(Int8Array);
3767
+
3768
+ for (const C of [Array, String, TypedArray]) {
3769
+ if (C) {
3770
+ Object.defineProperty(C.prototype, "at", {
3771
+ value: at,
3772
+ writable: true,
3773
+ enumerable: false,
3774
+ configurable: true
3775
+ });
3776
+ }
3777
+ }
3778
+
3755
3779
  const helpInformation = commander.Command.prototype.helpInformation;
3756
3780
 
3757
3781
  function colorizeSection(str, section) {