{"id":21933530,"url":"https://github.com/chee/exceptional-objects","last_synced_at":"2025-03-22T13:25:43.899Z","repository":{"id":57231630,"uuid":"455321983","full_name":"chee/exceptional-objects","owner":"chee","description":"create strict objects that will throw an exception if you try to get a property from them that they don't have","archived":false,"fork":false,"pushed_at":"2022-08-05T01:18:26.000Z","size":27,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-15T15:40:46.682Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chee.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}},"created_at":"2022-02-03T20:44:09.000Z","updated_at":"2023-01-01T12:10:48.000Z","dependencies_parsed_at":"2022-09-26T16:40:35.373Z","dependency_job_id":null,"html_url":"https://github.com/chee/exceptional-objects","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chee%2Fexceptional-objects","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chee%2Fexceptional-objects/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chee%2Fexceptional-objects/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chee%2Fexceptional-objects/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chee","download_url":"https://codeload.github.com/chee/exceptional-objects/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244961454,"owners_count":20538970,"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":[],"created_at":"2024-11-29T00:12:24.142Z","updated_at":"2025-03-22T13:25:43.867Z","avatar_url":"https://github.com/chee.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# exceptional objects\n\ncreate strict objects that will throw an exception if you try to get a property\nfrom them that they don't have.\n\nuses Proxy.\n\nhere's some typed up:\n\n```js\nconst exceptional = require('exceptional-objects')\nconst dog = exceptional({bark: 'woof', color: 'tan'})\ndog.bark\n//-\u003e 'woof'\ndog.color\n//-\u003e 'tan'\ndog.name\n//-\u003e throws \"Error: Object does not contain name\"\n```\n\nyou can still set things like normal:\n\n```js\nconst lol = exceptional({})\nconsole.log(lol.dog) //-\u003e throws \"Error: Object does not contain dog\"\nlol.dog = 'henry'\nconsole.log(lol.dog) //-\u003e henry\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchee%2Fexceptional-objects","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchee%2Fexceptional-objects","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchee%2Fexceptional-objects/lists"}