{"id":18817829,"url":"https://github.com/vitorluizc/maybe","last_synced_at":"2025-07-05T21:33:04.849Z","repository":{"id":57100422,"uuid":"170064088","full_name":"VitorLuizC/maybe","owner":"VitorLuizC","description":"🌯 The prettiest TypeScript implementation of Maybe monad.","archived":false,"fork":false,"pushed_at":"2022-01-09T20:13:56.000Z","size":248,"stargazers_count":19,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-12T17:05:31.550Z","etag":null,"topics":["ava","bili","fp","functional","functional-programming","maybe","maybe-monad","maybe-type","optional","optional-type","optional-typing","type-safe","type-safety","typescript"],"latest_commit_sha":null,"homepage":"https://github.com/VitorLuizC/maybe/tree/master/docs","language":"TypeScript","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/VitorLuizC.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":"2019-02-11T03:51:03.000Z","updated_at":"2023-12-24T00:48:07.000Z","dependencies_parsed_at":"2022-08-20T21:40:28.995Z","dependency_job_id":null,"html_url":"https://github.com/VitorLuizC/maybe","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VitorLuizC%2Fmaybe","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VitorLuizC%2Fmaybe/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VitorLuizC%2Fmaybe/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VitorLuizC%2Fmaybe/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/VitorLuizC","download_url":"https://codeload.github.com/VitorLuizC/maybe/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248795318,"owners_count":21162748,"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":["ava","bili","fp","functional","functional-programming","maybe","maybe-monad","maybe-type","optional","optional-type","optional-typing","type-safe","type-safety","typescript"],"created_at":"2024-11-08T00:13:36.089Z","updated_at":"2025-04-13T23:24:57.458Z","avatar_url":"https://github.com/VitorLuizC.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `@bitty/maybe`\n\n[![Library minified size](https://badgen.net/bundlephobia/min/@bitty/maybe)](https://bundlephobia.com/result?p=@bitty/maybe)\n[![Library minified + gzipped size](https://badgen.net/bundlephobia/minzip/@bitty/maybe)](https://bundlephobia.com/result?p=@bitty/maybe)\n\n## Installation\n\nThis library is published in the NPM registry and can be installed using any compatible package manager.\n\n```sh\nnpm install @bitty/maybe --save\n\n# For Yarn, use the command below.\nyarn add @bitty/maybe\n```\n\n### Installation from CDN\n\nThis module has a UMD bundle available through JSDelivr and Unpkg CDNs.\n\n```html\n\u003c!-- For UNPKG use the code below. --\u003e\n\u003cscript src=\"https://unpkg.com/@bitty/maybe\"\u003e\u003c/script\u003e\n\n\u003c!-- For JSDelivr use the code below. --\u003e\n\u003cscript src=\"https://cdn.jsdelivr.net/npm/@bitty/maybe\"\u003e\u003c/script\u003e\n\n\u003cscript\u003e\n  // UMD module is exposed through the \"Maybe\" global object.\n  Maybe.fromFalsy(document.querySelector('input#id'))\n    .chain((el) =\u003e Maybe.fromFalsy(el.value?.trim()))\n    .map(console.log);\n\u003c/script\u003e\n```\n\n## Examples\n\n- [`getLanguage`](./examples/getLanguage/getLanguage.ts) is a function that resolves language in application. Its a pretty common case and it was implemented in the way I think we should use `Maybe`.\n\n## License\n\nReleased under [MIT License](./LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvitorluizc%2Fmaybe","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvitorluizc%2Fmaybe","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvitorluizc%2Fmaybe/lists"}