{"id":21927007,"url":"https://github.com/rzane/sensible-maybe","last_synced_at":"2025-03-22T12:15:09.372Z","repository":{"id":34290893,"uuid":"174602351","full_name":"rzane/sensible-maybe","owner":"rzane","description":"Maybe you should use a Maybe?","archived":false,"fork":false,"pushed_at":"2022-07-20T06:07:40.000Z","size":641,"stargazers_count":2,"open_issues_count":8,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-04T09:07:39.914Z","etag":null,"topics":["functional-programming","javascript","maybe","typescript"],"latest_commit_sha":null,"homepage":"","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/rzane.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}},"created_at":"2019-03-08T20:10:06.000Z","updated_at":"2021-05-05T06:10:32.000Z","dependencies_parsed_at":"2022-08-08T00:15:30.396Z","dependency_job_id":null,"html_url":"https://github.com/rzane/sensible-maybe","commit_stats":null,"previous_names":["rzane/maybe"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rzane%2Fsensible-maybe","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rzane%2Fsensible-maybe/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rzane%2Fsensible-maybe/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rzane%2Fsensible-maybe/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rzane","download_url":"https://codeload.github.com/rzane/sensible-maybe/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244952805,"owners_count":20537474,"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":["functional-programming","javascript","maybe","typescript"],"created_at":"2024-11-28T22:12:59.715Z","updated_at":"2025-03-22T12:15:09.348Z","avatar_url":"https://github.com/rzane.png","language":"TypeScript","readme":"# sensible-maybe\n\nA pretty barebones Maybe implementation in TypeScript. Let's try to stay practical. You don't need to build your entire application with this thing.\n\n[View the documentation](docs/modules.md)\n\n## Installing\n\n    $ yarn add sensible-maybe\n\n## Examples\n\n```tsx\nMaybe.of(getUser())\n  .map((user) =\u003e user.name)\n  .getOrElse(\"Not signed in\");\n\nMaybe.of(getUser()).either(\n  (user) =\u003e \u003ca href=\"/account\"\u003e{user.name}\u003c/a\u003e,\n  () =\u003e \u003ca href=\"/login\"\u003eLogin\u003c/a\u003e\n);\n\nMaybe.of(getUser())\n  .filter((user) =\u003e user.isAdmin)\n  .map((user) =\u003e `Admin: ${user.name}`)\n  .getOrElse(\"Unauthorized!\");\n\nMaybe.of(getUser())\n  .map((user) =\u003e user.name)\n  .forEach((name) =\u003e console.log(name));\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frzane%2Fsensible-maybe","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frzane%2Fsensible-maybe","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frzane%2Fsensible-maybe/lists"}