{"id":25582612,"url":"https://github.com/mitsuki31/deepget","last_synced_at":"2026-02-28T19:01:32.595Z","repository":{"id":277743698,"uuid":"933348013","full_name":"mitsuki31/deepget","owner":"mitsuki31","description":"A lightweight and safe utility for retrieving values from deeply nested JavaScript objects using dot and array notation, ensuring undefined safety.","archived":false,"fork":false,"pushed_at":"2025-02-16T17:25:24.000Z","size":132,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-29T23:52:53.161Z","etag":null,"topics":["javascript","json","library","nodejs","object","path-traversal","typescript"],"latest_commit_sha":null,"homepage":"https://mitsuki31.github.io/deepget/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mitsuki31.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-02-15T18:33:09.000Z","updated_at":"2025-02-16T17:25:27.000Z","dependencies_parsed_at":"2025-06-23T09:02:46.844Z","dependency_job_id":"12069c5b-bc83-442e-9fe7-5484d613aad6","html_url":"https://github.com/mitsuki31/deepget","commit_stats":null,"previous_names":["mitsuki31/deepget"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/mitsuki31/deepget","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mitsuki31%2Fdeepget","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mitsuki31%2Fdeepget/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mitsuki31%2Fdeepget/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mitsuki31%2Fdeepget/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mitsuki31","download_url":"https://codeload.github.com/mitsuki31/deepget/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mitsuki31%2Fdeepget/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29948228,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-28T18:42:55.706Z","status":"ssl_error","status_checked_at":"2026-02-28T18:42:48.811Z","response_time":90,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["javascript","json","library","nodejs","object","path-traversal","typescript"],"created_at":"2025-02-21T05:17:45.574Z","updated_at":"2026-02-28T19:01:32.569Z","avatar_url":"https://github.com/mitsuki31.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DeepGet\n\n**DeepGet** is a lightweight and safe utility for retrieving values from deeply nested JavaScript objects\nusing dot and array notation. It ensures undefined safety, making object traversal hassle-free.\nSay goodbye to complex conditional checks and errors — **DeepGet** simplifies object traversal with ease.\n\n## Features\n\n- **Dot notation support** – Access deep properties easily (`\"a.b.c\"`).\n- **Array index notation** – Retrieve array elements (`\"a.b.c[1]\"`).\n- **Custom Separator Support** - Use a custom separator instead of a single dot (`\".\"`).\n- **Safe access** – Prevents errors and returns `undefined` if the key either is invalid or missing.\n- **Lightweight** – No third-party dependencies, minimal footprint.\n\n## Installation\n\n```sh\nnpm install @mitsuki31/deepget\n```\n\n## Usage\n\n### Import\n\n#### CommonJS\n\n```js\nconst { DeepGet } = require('@mitsuki31/deepget');\n```\n\n#### ES Module\n\n```js\nimport DeepGet from '@mitsuki31/deepget';\n// Or: import { DeepGet } from 'deepget';\n```\n\n\u003e TIP: For more simplicity naming purpose, you can do, for example:\n\u003e ```js\n\u003e import DeepGet as DG from '@mitsuki31/deepget';\n\u003e ```\n\n### Basic Usage\n\n```js\nconst obj = { a: { b: { c: 42, $1: 1 } } };\n\nconsole.log(DeepGet(obj, \"a.b.c\"));   // 42\nconsole.log(DeepGet(obj, \"a.b.$1\"));  // 1\nconsole.log(DeepGet(obj, \"a.x.y\"));   // undefined\n```\n\n### Array Index Notation\n\n```js\nconst obj = { a: { b: { c: [10, 20, 30, [ 'foo' ]] } } };\n\nconsole.log(DeepGet(obj, \"a.b.c[1]\"));     // 20\nconsole.log(DeepGet(obj, \"a.b.c[5]\"));     // undefined\nconsole.log(DeepGet(obj, \"a.b.c[3][0]\"));  // foo\n```\n\n### Using a Custom Separator\n\n```js\nconst obj = { a: { b: { c: 42 } } };\nconsole.log(DeepGet(obj, \"a::b::c\", { sep: \"::\" })); // 42\n```\n\n## API\n\nRefer to the [**Homepage**](https://mitsuki31.github.io/deepget) for detailed APIs information.\n\n## Why Use DeepGet?\n\n- **Prevents runtime errors**: No need for manual `if` checks.\n- **Handles missing values gracefully**: Avoids `TypeError: Cannot read property ... of undefined`.\n- **Intuitive dot and array notation**: Access nested data effortlessly, also support nested arrays.\n\n## License\n\nLicensed under the [MIT License](./LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmitsuki31%2Fdeepget","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmitsuki31%2Fdeepget","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmitsuki31%2Fdeepget/lists"}