{"id":18870367,"url":"https://github.com/streetstrider/alt","last_synced_at":"2026-02-14T17:30:13.926Z","repository":{"id":62384195,"uuid":"560177492","full_name":"StreetStrider/alt","owner":"StreetStrider","description":"generalization over Option, Either, Result and others for the practical use in JavaScript apps","archived":false,"fork":false,"pushed_at":"2024-05-12T22:45:23.000Z","size":95,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-12-30T23:46:43.616Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/StreetStrider.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":"2022-10-31T22:42:30.000Z","updated_at":"2024-05-12T22:45:26.000Z","dependencies_parsed_at":"2023-11-18T20:30:11.816Z","dependency_job_id":"259fdc85-f049-4724-a990-c6e34b0ad17e","html_url":"https://github.com/StreetStrider/alt","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StreetStrider%2Falt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StreetStrider%2Falt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StreetStrider%2Falt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StreetStrider%2Falt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/StreetStrider","download_url":"https://codeload.github.com/StreetStrider/alt/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239816505,"owners_count":19701753,"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-08T05:19:52.326Z","updated_at":"2026-02-14T17:30:13.783Z","avatar_url":"https://github.com/StreetStrider.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Alt\n\nGeneralization over Option, Either, Result and others for the practical use in JavaScript apps.\n\n```jsx\nfunction View () {\n  const [ state, _ ] = useSomeState()\n\n  useEffect(() =\u003e {\n    state.tap_of('ERROR', error =\u003e console.error(error))\n  }, [ state ])\n\n  return \u003cdiv\u003e\n  {\n    state\n    .map(data =\u003e \u003cComponent data={ data } /\u003e)\n    .settle_of('PROGRESS', () =\u003e \u003cLoading /\u003e)\n    .settle_of('ERROR', error =\u003e \u003cdiv className='error'\u003eError: { error.message }\u003c/div\u003e)\n    .extract()\n  }\n  \u003c/div\u003e\n}\n```\n\n`extract` takes OK value out of the Alt. It is exhaustive. If Alt is not settled to OK only it will return `unknown` type in static time and throw in run time.\n\n## license\n\nISC, © Strider, 2024.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstreetstrider%2Falt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstreetstrider%2Falt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstreetstrider%2Falt/lists"}