{"id":15505357,"url":"https://github.com/hasparus/maybe-ts","last_synced_at":"2025-04-23T01:37:50.422Z","repository":{"id":72291919,"uuid":"227479585","full_name":"hasparus/maybe-ts","owner":"hasparus","description":"A lightweight Maybe type for fp-ts","archived":false,"fork":false,"pushed_at":"2020-04-04T13:02:14.000Z","size":1036,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-19T05:17:00.830Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://maybe-ts.now.sh/","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/hasparus.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":"2019-12-11T23:27:33.000Z","updated_at":"2020-11-18T16:01:32.000Z","dependencies_parsed_at":"2023-03-11T12:11:51.053Z","dependency_job_id":null,"html_url":"https://github.com/hasparus/maybe-ts","commit_stats":{"total_commits":18,"total_committers":2,"mean_commits":9.0,"dds":0.05555555555555558,"last_synced_commit":"884dc9e11d75100081713e847cf83a6c0e67a71b"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hasparus%2Fmaybe-ts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hasparus%2Fmaybe-ts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hasparus%2Fmaybe-ts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hasparus%2Fmaybe-ts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hasparus","download_url":"https://codeload.github.com/hasparus/maybe-ts/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250354270,"owners_count":21416747,"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-10-02T09:22:53.302Z","updated_at":"2025-04-23T01:37:50.414Z","avatar_url":"https://github.com/hasparus.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# maybe-ts\n\nA lightweight Maybe type for fp-ts\n\n```ts\nexport type Nothing = null | undefined;\nexport const Nothing = null as Nothing;\n\nexport type Maybe\u003cT\u003e = T | Nothing;\n```\n\n### 🤹‍♂️ Instance of your favorite type classes\n\n**Edit: Not really.** This is not a functor over nullables. I wrote about it at [haspar.us/speaking/maybe-ts](https://haspar.us/speaking/maybe-ts).\n\ncounterexample to composition law of the functor:\n\n![](https://i.imgur.com/kdS3zVL.png)\n\nCredits to [OliverJAsh](https://github.com/OliverJAsh) for spoiling the fun ;)\n\n---\n\n- [x] ~~[Monad1](https://dev.to/gcanti/getting-started-with-fp-ts-monad-6k)~~\n- [x] [Foldable1](https://github.com/gcanti/fp-ts/blob/master/src/Foldable.ts)\n- [x] [Traversable1](https://github.com/gcanti/fp-ts/blob/master/src/Traversable.ts)\n- [x] [Alternative1](https://github.com/gcanti/fp-ts/blob/master/src/Alternative.ts)\n- [x] [Extend1](https://github.com/gcanti/fp-ts/blob/master/src/Extend.ts)\n- [x] [Compactable1](https://github.com/gcanti/fp-ts/blob/master/src/Compactable.ts)\n- [x] [Filterable1](https://github.com/gcanti/fp-ts/blob/master/src/Filterable.ts)\n\n## Installation\n\n```\nnpm install @hasparus/maybe-ts\n\nyarn add @hasparus/maybe-ts\n```\n\n## Requirements\n\n```\nfp-ts ^2.3\nTypeScript \u003e= 3.7\n```\n\n## Contributing\n\nFound a bug? Have an idea for improvements?\nFeel free to shoot a PR!\n\n---\n\nSlides: https://maybe-ts.now.sh/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhasparus%2Fmaybe-ts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhasparus%2Fmaybe-ts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhasparus%2Fmaybe-ts/lists"}