{"id":21063680,"url":"https://github.com/aleksrutins/result","last_synced_at":"2026-04-28T10:34:21.614Z","repository":{"id":245198994,"uuid":"817546932","full_name":"aleksrutins/result","owner":"aleksrutins","description":null,"archived":false,"fork":false,"pushed_at":"2024-06-20T00:55:25.000Z","size":3,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-10T19:17:59.589Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aleksrutins.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2024-06-20T00:43:10.000Z","updated_at":"2024-06-20T00:55:28.000Z","dependencies_parsed_at":"2024-06-20T13:16:32.242Z","dependency_job_id":"01b59e1b-9937-4f2f-ad4a-513f359b6a9a","html_url":"https://github.com/aleksrutins/result","commit_stats":null,"previous_names":["aleksrutins/result"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aleksrutins%2Fresult","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aleksrutins%2Fresult/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aleksrutins%2Fresult/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aleksrutins%2Fresult/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aleksrutins","download_url":"https://codeload.github.com/aleksrutins/result/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243505996,"owners_count":20301638,"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-19T17:46:47.811Z","updated_at":"2025-12-30T15:54:23.621Z","avatar_url":"https://github.com/aleksrutins.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @asr/result\n\n[![JSR](https://jsr.io/badges/@asr/result)](https://jsr.io/@asr/result)\n[![JSR Score](https://jsr.io/badges/@asr/result/score)](https://jsr.io/@asr/result)\n\nA simple library for result-based error handling, inspired by Rust's `Result`.\n\nA code block is worth a thousand words:\n```ts\nimport { Result } from '@asr/result';\n\nconst okResult = Result.ok('hello, world');\nconst errorResult = Result.error('not OK');\n\nokResult.unwrap() // 'hello, world'\nerrorResult.unwrap() // ResultError: not OK\n\nerrorResult.unwrapOr('rescued from certain doom') // 'rescued from certain doom'\n\nerrorResult.unwrapOrElse(() =\u003e 'another value') // 'another value'\n\nokResult.ok() // true\nerrorResult.ok() // false\n\nokResult.map(it =\u003e it + \", Joe\").unwrap() // 'hello, world, Joe'\nerrorResult.mapError(it =\u003e it + \", Houston\").error // 'not OK, Houston'\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faleksrutins%2Fresult","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faleksrutins%2Fresult","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faleksrutins%2Fresult/lists"}