Private Static ReadonlyBRACKET_Regular expression to match bracket notation in paths
Private Static ReadonlyPATH_Path cache for efficient parsing
StaticgetDeeply get a value from an object by a path string.
The type of the object to get the value from
The return type of the value
StatichasCheck if a path exists in an object.
The type of the object to get the value from
The object to check
The path string, e.g. a.b.c
StaticmergeDeeply merge two objects, where the second object overrides the first.
The type of the object to get the value from
StaticparseParse a path string into an array of keys.
The path string, e.g. a.b.c or a[0].b
['a', 'b', 'c'] or ['a', 0, 'b']StaticrmvDelete a value at a specified path in an object.
The type of the object to get the value from
The object to delete the value from
The path string, e.g. a.b.c
OptionalpreserveEmpty: boolean = falseWhether to preserve empty objects/arrays
StaticsetDeeply set a value in an object by a path string.
The type of the object to get the value from
The object to set the value in
The path string, e.g. a.b.c
The value to set at the specified path
Private StaticwalkWalk through an object using an array of keys and return whether the path exists and its value.
The object to walk through
An array of keys representing the path to walk
DeepMerge class provides static methods for deep merging objects and manipulating nested properties using path strings.