{"id":19163290,"url":"https://github.com/oada/oadaify","last_synced_at":"2026-04-14T18:32:16.045Z","repository":{"id":41845574,"uuid":"331765416","full_name":"OADA/oadaify","owner":"OADA","description":"Make OADA data nicer to work with in JS/TS","archived":false,"fork":false,"pushed_at":"2023-12-14T15:43:22.000Z","size":1228,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":13,"default_branch":"master","last_synced_at":"2024-04-11T16:15:34.315Z","etag":null,"topics":["oada","typescript"],"latest_commit_sha":null,"homepage":"","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/OADA.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}},"created_at":"2021-01-21T21:56:24.000Z","updated_at":"2022-02-09T04:28:30.000Z","dependencies_parsed_at":"2023-12-14T16:52:21.088Z","dependency_job_id":null,"html_url":"https://github.com/OADA/oadaify","commit_stats":{"total_commits":7,"total_committers":2,"mean_commits":3.5,"dds":0.2857142857142857,"last_synced_commit":"71e2cd73a261c7df8c8582c46e041a527bb2a1ca"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OADA%2Foadaify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OADA%2Foadaify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OADA%2Foadaify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OADA%2Foadaify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OADA","download_url":"https://codeload.github.com/OADA/oadaify/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240245887,"owners_count":19771029,"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","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":["oada","typescript"],"created_at":"2024-11-09T09:14:45.115Z","updated_at":"2026-04-14T18:32:16.013Z","avatar_url":"https://github.com/OADA.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @OADA/oadaify\n\nA library to make working with OADA data in JavaScript/TypeScript less annoying.\n\nI was always writing loops with checks to skip `_` keys,\nor forgetting to add the check and my code did something weird.\nThis makes loops etc. do what one expects and wants 99% of the time.\nThe library exports `Symbol`s which can be used to access the OADA keys.\n\nThe OADAified objects still function correctly with `JSON.stringify` and `ajv`.\nThere is a deoadaify function in the case you need to put it back.\n\nBe warned though, TypeScript is... quirky about `Symbol` keys in objects.\nYou should mostly be fine, but sometimes it will get dumb on you.\n\n## Example\n\n```typescript\nimport {\n  oadaify,\n  // Symbol for accessing `_id`\n  _id,\n} from '@oada/oadaify';\n\n// Some data from an OADA API\nconst data = {\n  _id: 'resources/123',\n  _rev: 1,\n  _type: 'application/foo+json',\n  foo: 'bar',\n  baz: 7,\n};\n\n// OADAify the data\nconst oadaified = oadaify(data);\n\n// Makes loops etc only get non OADA keys\nconsole.log(Object.entries(oadaified)); // [['foo', 'bar'], ['baz', 7]]\n\n// The OADA keys are not gone\nconsole.log(oadaified[_id]); // 'resources/123'\n\n// JSON is still original OADA data\nconsole.log(JSON.stringify(oadaified, null, 2));\n/*\n{\n  \"_id\": \"resources/123\",\n  \"_rev\": 1,\n  \"_type\": \"application/foo+json\",\n  \"foo\": \"bar\",\n  \"baz\": 7,\n}\n*/\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foada%2Foadaify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foada%2Foadaify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foada%2Foadaify/lists"}