{"id":37424291,"url":"https://github.com/hyperjump-io/json-pointer","last_synced_at":"2026-01-16T06:11:13.827Z","repository":{"id":40649716,"uuid":"139533144","full_name":"hyperjump-io/json-pointer","owner":"hyperjump-io","description":"An RFC-6901 JSON Pointer implementation","archived":false,"fork":false,"pushed_at":"2025-10-21T21:21:51.000Z","size":66,"stargazers_count":4,"open_issues_count":1,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-21T23:26:16.873Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/hyperjump-io.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":["hyperjump-io"]}},"created_at":"2018-07-03T05:33:54.000Z","updated_at":"2025-10-21T21:21:47.000Z","dependencies_parsed_at":"2025-08-20T00:56:49.491Z","dependency_job_id":"ca11fd95-acc3-4324-b37b-4afbd3701633","html_url":"https://github.com/hyperjump-io/json-pointer","commit_stats":{"total_commits":69,"total_committers":4,"mean_commits":17.25,"dds":"0.17391304347826086","last_synced_commit":"8d7dac698ead1d853c6c32f765d501fab9b8c685"},"previous_names":["jdesrosiers/json-pointer"],"tags_count":26,"template":false,"template_full_name":null,"purl":"pkg:github/hyperjump-io/json-pointer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyperjump-io%2Fjson-pointer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyperjump-io%2Fjson-pointer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyperjump-io%2Fjson-pointer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyperjump-io%2Fjson-pointer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hyperjump-io","download_url":"https://codeload.github.com/hyperjump-io/json-pointer/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyperjump-io%2Fjson-pointer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28477633,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T03:13:13.607Z","status":"ssl_error","status_checked_at":"2026-01-16T03:11:47.863Z","response_time":107,"last_error":"SSL_read: 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":[],"created_at":"2026-01-16T06:11:13.163Z","updated_at":"2026-01-16T06:11:13.819Z","avatar_url":"https://github.com/hyperjump-io.png","language":"JavaScript","funding_links":["https://github.com/sponsors/hyperjump-io"],"categories":[],"sub_categories":[],"readme":"# JSON Pointer\n\nThis is an implementation of RFC-6901 JSON Pointer. JSON Pointer is designed for\nreferring to data values within a JSON document. It's designed to be URL\nfriendly so it can be used as a URL fragment that points to a specific part of\nthe JSON document.\n\n## Installation\n\nIncludes support for node.js (ES Modules, TypeScript) and browsers.\n\n```bash\nnpm install @hyperjump/json-pointer\n```\n\n## Usage\n\n```javascript\nimport * as JsonPointer from \"@hyperjump/json-pointer\";\n\nconst value = {\n  \"foo\": {\n    \"bar\": 42\n  }\n};\n\n// Construct pointers\nconst fooPointer = JsonPointer.append(\"foo\", JsonPointer.nil); // \"/foo\"\nconst fooBarPointer = JsonPointer.append(fooPointer, \"bar\"); // \"/foo/bar\"\n\n// Get a value from a pointer\nconst getFooBar = JsonPointer.get(fooBarPointer);\ngetFooBar(value); // 42\n\n// Set a value from a pointer\n// New value is returned without modifying the original\nconst setFooBar = JsonPointer.set(fooBarPointer);\nsetFooBar(value, 33); // { \"foo\": { \"bar\": 33 } }\n\n// Assign a value from a pointer\n// The original value is changed and no value is returned\nconst assignFooBar = JsonPointer.assign(fooBarPointer);\nassignFooBar(value, 33); // { \"foo\": { \"bar\": 33 } }\n\n// Unset a value from a pointer\n// New value is returned without modifying the original\nconst unsetFooBar = JsonPointer.unset(fooBarPointer);\nsetFooBar(value); // { \"foo\": {} }\n\n// Delete a value from a pointer\n// The original value is changed and no value is returned\nconst deleteFooBar = JsonPointer.remove(fooBarPointer);\ndeleteFooBar(value); // { \"foo\": {} }\n```\n\n## API\n\n* **nil**: \"\"\n\n    The empty pointer.\n* **pointerSegments**: (pointer: string) =\u003e Generator\\\u003cstring\u003e\n\n    An iterator for the segments of a JSON Pointer that handles escaping.\n* **append**: (segment: string, pointer: string) =\u003e string\n\n    Append a segment to a JSON Pointer.\n* **get**: (pointer: string, subject: any) =\u003e any\n\n    Use a JSON Pointer to get a value. This function can be curried.\n* **set**: (pointer: string, subject: any, value: any) =\u003e any\n\n    Immutably set a value using a JSON Pointer. Returns a new version of\n    `subject` with the value set. The original `subject` is not changed, but the\n    value isn't entirely cloned. Values that aren't changed will point to\n    the same value as the original. This function can be curried.\n* **assign**: (pointer: string, subject: any, value: any) =\u003e void\n\n    Mutate a value using a JSON Pointer. This function can be curried.\n* **unset**: (pointer: string, subject: any) =\u003e any\n\n    Immutably delete a value using a JSON Pointer. Returns a new version of\n    `subject` without the value. The original `subject` is not changed, but the\n    value isn't entirely cloned. Values that aren't changed will point to the\n    same value as the original. This function can be curried.\n* **remove**: (pointer: string, subject: any) =\u003e void\n\n    Delete a value using a JSON Pointer. This function can be curried.\n\n## Contributing\n\n### Tests\n\nRun the tests\n\n```bash\nnpm test\n```\n\nRun the tests with a continuous test runner\n```bash\nnpm test -- --watch\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhyperjump-io%2Fjson-pointer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhyperjump-io%2Fjson-pointer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhyperjump-io%2Fjson-pointer/lists"}