{"id":16336443,"url":"https://github.com/justinwoo/purescript-ochadzuke","last_synced_at":"2025-11-03T07:30:26.917Z","repository":{"id":58237411,"uuid":"151481282","full_name":"justinwoo/purescript-ochadzuke","owner":"justinwoo","description":"A library that combines Simple-JSON, Milkis (Fetch), and Chirashi (Error subtypes).","archived":false,"fork":false,"pushed_at":"2018-10-03T21:14:55.000Z","size":3,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-27T04:06:26.125Z","etag":null,"topics":["chirashi","milkis","purescript","simple-json"],"latest_commit_sha":null,"homepage":"","language":"PureScript","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/justinwoo.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":"2018-10-03T21:14:16.000Z","updated_at":"2021-03-06T19:18:24.000Z","dependencies_parsed_at":"2022-08-30T22:30:53.233Z","dependency_job_id":null,"html_url":"https://github.com/justinwoo/purescript-ochadzuke","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justinwoo%2Fpurescript-ochadzuke","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justinwoo%2Fpurescript-ochadzuke/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justinwoo%2Fpurescript-ochadzuke/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justinwoo%2Fpurescript-ochadzuke/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/justinwoo","download_url":"https://codeload.github.com/justinwoo/purescript-ochadzuke/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239412505,"owners_count":19634016,"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":["chirashi","milkis","purescript","simple-json"],"created_at":"2024-10-10T23:44:10.291Z","updated_at":"2025-11-03T07:30:26.887Z","avatar_url":"https://github.com/justinwoo.png","language":"PureScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Purescript-Ochadzuke\n\nA library that combines Simple-JSON, [Milkis](https://github.com/justinwoo/purescript-milkis) (Fetch), and [Chirashi](https://github.com/justinwoo/purescript-chirashi) (Error subtypes).\n\nIt's ochadzuke made by mixing Chirashi and Milkis.\n\n![](https://i.imgur.com/sUeJgfi.png)\n\n## Usage\n\n```purs\nmain :: Effect Unit\nmain = Aff.launchAff_ do\n\n  -- works normally\n  normal \u003c- fetch' testUrl O.defaultFetchOptions'\n  assertEqual'\n    { expected: { \"userId\": 1 }\n    , actual: normal\n    }\n\n  -- gives an error in readForeign on mismatched decoding type\n  wrong \u003c- Aff.attempt $ fetch' testUrl O.defaultFetchOptions'\n  case wrong of\n    Left e\n      | Just (variant :: O.Error) \u003c- C.readVariant e\n      , Just multipleErrors \u003c- V.prj O.readForeignS variant -\u003e do\n      pure unit\n    Right (e :: { asdf :: String }) -\u003e Aff.throwError $ Aff.error \"False parsing result\"\n    Left e -\u003e\n      Aff.throwError e\n\n  -- gives an error in otherS on random other failure\n  wrong2 \u003c- Aff.attempt $ fetch' (M.URL \"sdflsjdfasdf\") O.defaultFetchOptions'\n  case wrong2 of\n    Left e\n      | Just (variant :: O.Error) \u003c- C.readVariant e\n      , Just other \u003c- V.prj O.otherS variant -\u003e\n      assertEqual'\n        { expected: \"TypeError: Only absolute URLs are supported\"\n        , actual: Aff.message other\n        }\n    Right (e :: {}) -\u003e Aff.throwError $ Aff.error \"False parsing result\"\n    Left e -\u003e Aff.throwError e\n```\n\nSee the [API Docs](https://pursuit.purescript.org/packages/purescript-ochadzuke/) or the [tests](test/Main.purs) for usage.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjustinwoo%2Fpurescript-ochadzuke","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjustinwoo%2Fpurescript-ochadzuke","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjustinwoo%2Fpurescript-ochadzuke/lists"}