@ztimson/utils 0.26.1 → 0.26.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.
package/dist/objects.d.ts CHANGED
@@ -100,13 +100,15 @@ export declare function formData(target: any): FormData;
100
100
  */
101
101
  export declare function includes(target: any, values: any, allowMissing?: boolean): boolean;
102
102
  /**
103
- * Deep check if two objects are equal
103
+ * Deep check if two items are equal.
104
+ * Handles primitives, objects, arrays, functions, Date, RegExp, and circular references.
104
105
  *
105
106
  * @param {any} a - first item to compare
106
107
  * @param {any} b - second item to compare
108
+ * @param {WeakMap<object, object>} [seen] - Internal parameter to track circular references
107
109
  * @returns {boolean} True if they match
108
110
  */
109
- export declare function isEqual(a: any, b: any): boolean;
111
+ export declare function isEqual(a: any, b: any, seen?: WeakMap<object, object>): boolean;
110
112
  /**
111
113
  * Experimental: Combine multiple object prototypes into one
112
114
  *
@@ -50,6 +50,8 @@ export declare class PathEvent {
50
50
  name: string;
51
51
  /** List of methods */
52
52
  methods: ASet<Method>;
53
+ /** Internal cache for PathEvent instances to avoid redundant parsing */
54
+ private static pathEventCache;
53
55
  /** All/Wildcard specified */
54
56
  get all(): boolean;
55
57
  set all(v: boolean);
@@ -69,6 +71,8 @@ export declare class PathEvent {
69
71
  get delete(): boolean;
70
72
  set delete(v: boolean);
71
73
  constructor(e: string | PathEvent);
74
+ /** Clear the cache of all PathEvents */
75
+ static clearCache(): void;
72
76
  /**
73
77
  * Combine multiple events into one parsed object. Longest path takes precedent, but all subsequent methods are
74
78
  * combined until a "none" is reached
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ztimson/utils",
3
- "version": "0.26.1",
3
+ "version": "0.26.2",
4
4
  "description": "Utility library",
5
5
  "author": "Zak Timson",
6
6
  "license": "MIT",