{"id":19682622,"url":"https://github.com/rolangom/rolads","last_synced_at":"2026-04-14T07:32:54.336Z","repository":{"id":143851927,"uuid":"127214065","full_name":"rolangom/rolads","owner":"rolangom","description":"Monads implementation by @rolangom","archived":false,"fork":false,"pushed_at":"2018-03-30T15:19:36.000Z","size":7,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-27T07:25:49.358Z","etag":null,"topics":["functional","functional-js","functional-programming","javascript","javascript-library","node-js"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/rolangom.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":"2018-03-29T00:21:39.000Z","updated_at":"2018-03-30T15:19:37.000Z","dependencies_parsed_at":null,"dependency_job_id":"79e21ad3-2414-4538-9415-c669ea31f334","html_url":"https://github.com/rolangom/rolads","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rolangom/rolads","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rolangom%2Frolads","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rolangom%2Frolads/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rolangom%2Frolads/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rolangom%2Frolads/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rolangom","download_url":"https://codeload.github.com/rolangom/rolads/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rolangom%2Frolads/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31786854,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-14T02:24:21.117Z","status":"ssl_error","status_checked_at":"2026-04-14T02:24:20.627Z","response_time":153,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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","functional-js","functional-programming","javascript","javascript-library","node-js"],"created_at":"2024-11-11T18:11:31.009Z","updated_at":"2026-04-14T07:32:54.321Z","avatar_url":"https://github.com/rolangom.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# rolads\nMonads implementation by @rolangom: Option (Some and None) and Either (Left and Right).\n\n\n```javascript\nconst { Left, match, None, Right, Some, Either } = require('./index');\n\nconst eitherL1 = Left.of('Error');\nconst eitherR1 = Right.of('Success');\n\nconsole.log('results1 of Left should be \"Error\".');\nconst results1 = match({ left: value =\u003e value, right: value =\u003e value }, eitherL1);\nconsole.assert(results1 === 'Error', 'Result of Left should be \"Error\".');\n\n\nconsole.log('results2 should be \"Success\".');\nconst results2 = match({ left: value =\u003e value, right: value =\u003e value }, eitherR1);\nconsole.assert(results2 === 'Success', 'Result of Right should be \"Success\".');\n\n\nconst optionS1 = Some.of(1);\nconst optionN1 = None;\n\nconsole.log('Result of Some should be 1.');\nconst result3 = match({ some: val =\u003e val, none: () =\u003e 0 }, optionS1);\nconsole.assert(result3 === 1, 'Result of Some should be 1.');\n\n\nconsole.log('result5 should be 0.');\nconst result4 = match({ some: val =\u003e val, none: () =\u003e 0 }, optionN1);\nconsole.assert(result4 === 0, 'Result of None should be 0.');\n\n\n```\n\nInspired on 'https://drboolean.gitbooks.io/mostly-adequate-guide-old/content/', https://github.com/origamitower/folktale and others.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frolangom%2Frolads","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frolangom%2Frolads","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frolangom%2Frolads/lists"}