{"id":16904002,"url":"https://github.com/jakxz/functional-or","last_synced_at":"2025-03-20T15:27:40.130Z","repository":{"id":42685528,"uuid":"260375570","full_name":"JaKXz/functional-or","owner":"JaKXz","description":"functional OR in js","archived":false,"fork":false,"pushed_at":"2023-04-10T17:01:03.000Z","size":540,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-25T14:42:09.835Z","etag":null,"topics":["functional-programming","javascript","or"],"latest_commit_sha":null,"homepage":"https://npm.im/@jakxz/functional-or","language":"JavaScript","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/JaKXz.png","metadata":{"files":{"readme":"readme.md","changelog":"CHANGELOG.md","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":"2020-05-01T04:00:34.000Z","updated_at":"2023-03-07T13:37:29.000Z","dependencies_parsed_at":"2024-10-13T18:30:43.376Z","dependency_job_id":null,"html_url":"https://github.com/JaKXz/functional-or","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/JaKXz%2Ffunctional-or","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JaKXz%2Ffunctional-or/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JaKXz%2Ffunctional-or/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JaKXz%2Ffunctional-or/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JaKXz","download_url":"https://codeload.github.com/JaKXz/functional-or/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244639158,"owners_count":20485830,"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","or"],"created_at":"2024-10-13T18:30:34.054Z","updated_at":"2025-03-20T15:27:40.104Z","avatar_url":"https://github.com/JaKXz.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ca name=\"module_@jakxz/functional-or\"\u003e\u003c/a\u003e\n\n## @jakxz/functional-or\n\n\u003ca name=\"exp_module_@jakxz/functional-or--functionalOr\"\u003e\u003c/a\u003e\n\n### functionalOr(...fns) ⇒ \u003ccode\u003efunction\u003c/code\u003e ⏏\n\nA utility for composing a set of predicate functions that check against the\ncurried data to find if one of the predicate conditions is met. This is most\nhelpful when your predicates are relatively complex and you want to compose\nthe checks in existing piped or composed functions; for the simplest example,\nif you have:\n\n```js\nconst isFoo = (str) =\u003e str === \"foo\";\nconst isBar = (str) =\u003e str === \"bar\";\n```\n\nyou can compose these functions into:\n\n```js\nimport or from \"@jakxz/functional-or\";\n\nconst isFooOrBar = or(isFoo, isBar);\n```\n\nand use it like so:\n\n```js\nconst results = [\"foo\", \"bar\", \"baz\"].filter(isFooOrBar);\n```\n\nIf you don't want to pass any functions at all, you can just check the truthyness\nof your data args:\n\n```js\nconst isAnyTruthy = or()(\"x\", \"y\", 0, null);\n```\n\n**Kind**: Exported function\n\n| Param  | Description                                     |\n| ------ | ----------------------------------------------- |\n| ...fns | pass in any number of functions or none at all. |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjakxz%2Ffunctional-or","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjakxz%2Ffunctional-or","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjakxz%2Ffunctional-or/lists"}