@tspro/ts-utils-lib 3.0.0 → 3.1.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.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * TsUtilsLib v3.0.0 (esm)
2
+ * TsUtilsLib v3.1.1 (esm)
3
3
  * (c) 2023-2025 PahkaSoft
4
4
  * Licensed under the MIT License
5
5
  */
@@ -4392,11 +4392,42 @@ var LinkedList = class _LinkedList extends BaseContainer {
4392
4392
  }
4393
4393
  };
4394
4394
 
4395
+ // src/core/call-tracker.ts
4396
+ var _CallTracker = class _CallTracker {
4397
+ constructor() {
4398
+ __publicField(this, "counts", new UniMap((a, b) => a === b));
4399
+ }
4400
+ track(value) {
4401
+ const count = this.counts.getOrCreate(value, 0);
4402
+ this.counts.set(value, count + 1);
4403
+ }
4404
+ getCallCountFor(value) {
4405
+ return this.counts.get(value) ?? 0;
4406
+ }
4407
+ hasBeenCalledWith(value) {
4408
+ return this.getCallCountFor(value) > 0;
4409
+ }
4410
+ static track(value) {
4411
+ this._default.track(value);
4412
+ }
4413
+ static getCallCountFor(value) {
4414
+ return this._default.getCallCountFor(value);
4415
+ }
4416
+ static hasBeenCalledWith(value) {
4417
+ return this._default.hasBeenCalledWith(value);
4418
+ }
4419
+ };
4420
+ // ─────────────────────────────────────────
4421
+ // Static default tracker
4422
+ // ─────────────────────────────────────────
4423
+ __publicField(_CallTracker, "_default", new _CallTracker());
4424
+ var CallTracker = _CallTracker;
4425
+
4395
4426
  // src/index.ts
4396
4427
  function getLibInfo() {
4397
- return "TsUtilsLib v3.0.0 (esm)";
4428
+ return "TsUtilsLib v3.1.1 (esm)";
4398
4429
  }
4399
4430
 
4400
- export { AnchoredRect, assert_exports as Assert, BaseContainer, BiMap, cookies_exports as Cookies, DefaultArray, DefaultEqualityFn, device_exports as Device, guard_exports as Guard, IndexArray, LRUCache, LinkedList, MultiContainer, Rect, SignedIndexArray, Stack, TriMap, UniMap, utils_exports as Utils, ValueSet, Vec, asMulti, getLibInfo };
4431
+ export { AnchoredRect, assert_exports as Assert, BaseContainer, BiMap, CallTracker, cookies_exports as Cookies, DefaultArray, DefaultEqualityFn, device_exports as Device, guard_exports as Guard, IndexArray, LRUCache, LinkedList, MultiContainer, Rect, SignedIndexArray, Stack, TriMap, UniMap, utils_exports as Utils, ValueSet, Vec, asMulti, getLibInfo };
4401
4432
  //# sourceMappingURL=index.mjs.map
4402
4433
  //# sourceMappingURL=index.mjs.map