-
-
Notifications
You must be signed in to change notification settings - Fork 0
Added get()
#199
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added get()
#199
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces a new get() utility for retrieving nested values by dot/bracket path, enhances the type helpers to support key and path value extraction, updates tests around arrays and objects, adds pathParts() for parsing path segments, and bumps compiler settings and dependencies.
- Added
get()function and its accompanying tests. - Introduced/refined type helpers (
ValidKeys,GetValueForKey,PathValue,IfArray/IfArrayLike,IfTuple). - Updated TS configs (
tsconfig.mjs.json,tsconfig.base.json) and bumped dev dependencies inpackage.json.
Reviewed Changes
Copilot reviewed 13 out of 14 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tsconfig.mjs.json | Removed explicit Node16 module settings |
| tsconfig.base.json | Bumped lib to ES2023 and module target to NodeNext |
| test/types/arrays.test-d.ts | Updated IfArray test case |
| test/types/objects.test-d.ts | Added tests for new get()-related types |
| test/pathParts.test.ts | New tests for pathParts() parser |
| test/get.test.ts | Tests for the new get() function |
| src/types/tuples.ts | Added IfTuple/IsTuple type helpers |
| src/types/objects.ts | Refined ValidKeys, Path, and PathValue types |
| src/types/arrays.ts | Refined IfArray/IfArrayLike and array helpers |
| src/pathParts.ts | Implemented pathParts() generator |
| src/get.ts | Implemented get() function with overloads |
| src/index.ts | Exported get and pathParts |
| package.json | Bumped packageManager and dev dependency versions |
|
🎉 This PR is included in version 0.68.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
get()