{"id":15764205,"url":"https://github.com/devjiwonchoi/objra","last_synced_at":"2025-08-26T19:26:02.664Z","repository":{"id":181041635,"uuid":"666094142","full_name":"devjiwonchoi/objra","owner":"devjiwonchoi","description":"Declarative `replaceAll` function for Objects","archived":false,"fork":false,"pushed_at":"2023-07-13T19:20:49.000Z","size":40,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-25T21:53:19.225Z","etag":null,"topics":["object","replace","replaceall"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/objra","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/devjiwonchoi.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}},"created_at":"2023-07-13T17:39:35.000Z","updated_at":"2023-07-19T06:06:00.000Z","dependencies_parsed_at":null,"dependency_job_id":"4c6d687d-a945-45be-be4d-143794f381ba","html_url":"https://github.com/devjiwonchoi/objra","commit_stats":null,"previous_names":["devjiwonchoi/objra"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/devjiwonchoi/objra","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devjiwonchoi%2Fobjra","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devjiwonchoi%2Fobjra/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devjiwonchoi%2Fobjra/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devjiwonchoi%2Fobjra/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devjiwonchoi","download_url":"https://codeload.github.com/devjiwonchoi/objra/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devjiwonchoi%2Fobjra/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272248923,"owners_count":24899885,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-26T02:00:07.904Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["object","replace","replaceall"],"created_at":"2024-10-04T12:01:56.156Z","updated_at":"2025-08-26T19:26:02.622Z","avatar_url":"https://github.com/devjiwonchoi.png","language":"TypeScript","readme":"# objra - Object.replaceAll()\n\nDeclarative `replaceAll` function for Objects\n\n## Installation\n\n```bash\nnpm i objra\n```\n\n## Usage\n\n```ts\nimport objectReplaceAll from 'objra'\n\nobjectReplaceAll(regexp: string | RegExp, replacement: string, sourceObject: object)\n```\n\n**Note: The `replacement` will be available for `string[]` in the near future.**\n\n## Real World Usage\n\nConvert `nullish` values in object to given string.\n\n```js\nimport objectReplaceAll from 'objra'\n\nconst response = fetch(/* ... */)\nconst data = response.json()\n\n// Replace all null values with empty strings\n\nconst dataWithoutNulls = objectReplaceAll(null, '', data)\n```\n\nReplace `wildcard` values in object to given string.\n\n```js\nimport objectReplaceAll from 'objra'\n\nconst config = {\n  './*': {\n    types: './dist/*.d.ts',\n    import: './dist/*.js',\n  },\n}\n\n// This will be simplified in the near future.\nconst filenames = ['button', 'input', 'checkbox']\nconst resolvedArray = filenames.map((filename) =\u003e\n  objectReplaceAll('*', filename, config)\n)\n\nconst result = Object.assign({}, ...resolvedArray)\n\n// Output:\n// {\n//   './button': {\n//     types: './dist/button.d.ts',\n//     import: './dist/button.js',\n//   },\n//   './input': {\n//     types: './dist/input.d.ts',\n//     import: './dist/input.js',\n//   },\n//   './checkbox': {\n//     types: './dist/checkbox.d.ts',\n//     import: './dist/checkbox.js',\n//   },\n// }\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevjiwonchoi%2Fobjra","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevjiwonchoi%2Fobjra","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevjiwonchoi%2Fobjra/lists"}