You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
chore: update dependencies and improve filter function checks (#18)
- Bump devDependencies: @eslint/js to 10.0.1, @types/node to 25.5.0, prettier to 3.8.1, and typescript-eslint to 8.58.0.
- Refactor filter function checks in filter.test.ts to handle undefined values gracefully.
- Update tsconfig.json to set moduleResolution to "bundler" and specify rootDir as "lib".
Copy file name to clipboardExpand all lines: README.md
+12-15Lines changed: 12 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,6 @@
1
-
A utility library designed to simplify working with deeply nested objects in TypeScript. This is intended to be used when you work with dynamic keys or when you are not sure if the property exists. It provides a set of functions so you don't have to deal with the complexity of checking for the existence of properties at each level of the object.
1
+
A utility library designed to simplify working with deeply nested objects in TypeScript.
2
+
This is intended to be used when you work with dynamic keys or when you are not sure if the property exists.
3
+
It provides a set of functions so you don't have to deal with the complexity of checking for the existence of properties at each level of the object.
2
4
3
5
## Features
4
6
@@ -17,9 +19,11 @@ npm install @nuc-lib/deep-key
17
19
18
20
### Accessing Nested Properties
19
21
20
-
The `getKeyValue` utility lets you access nested properties using a dot notation string. If the property does not exist, it returns `undefined` instead of throwing an error.
22
+
The `getKeyValue` utility lets you access nested properties using a dot notation string.
23
+
If the property does not exist, it returns `undefined` instead of throwing an error.
21
24
22
-
The key is a string that represents the path to the property you want to access. The path is defined using dot notation, where each level of the object is separated by a dot.
25
+
The key is a string that represents the path to the property you want to access.
26
+
The path is defined using dot notation, where each level of the object is separated by a dot.
The `filterByKeyValue` utility allows you to filter an array of objects based on a nested property. It returns a new array containing only the objects that match the specified key and value.
74
+
The `filterByKeyValue` utility allows you to filter an array of objects based on a nested property.
75
+
It returns a new array containing only the objects that match the specified key and value.
The `sortByKeyValue` utility allows you to sort an array of objects based on a nested property. It returns a new array sorted in ascending order by default.
148
+
The `sortByKeyValue` utility allows you to sort an array of objects based on a nested property.
149
+
It returns a new array sorted in ascending order by default.
0 commit comments