{"id":17949719,"url":"https://github.com/slurmulon/flap","last_synced_at":"2025-07-20T14:33:05.797Z","repository":{"id":57237895,"uuid":"49183265","full_name":"slurmulon/flap","owner":"slurmulon","description":":rooster: Guard clauses for JS","archived":false,"fork":false,"pushed_at":"2019-11-01T19:58:48.000Z","size":46,"stargazers_count":4,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-11T18:35:01.628Z","etag":null,"topics":["clause","functional-programming","guard","guard-clauses","pattern-matching"],"latest_commit_sha":null,"homepage":"https://flap.js.org","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/slurmulon.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":"2016-01-07T05:29:54.000Z","updated_at":"2023-08-17T22:39:50.000Z","dependencies_parsed_at":"2022-08-26T14:04:17.403Z","dependency_job_id":null,"html_url":"https://github.com/slurmulon/flap","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/slurmulon/flap","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slurmulon%2Fflap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slurmulon%2Fflap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slurmulon%2Fflap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slurmulon%2Fflap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/slurmulon","download_url":"https://codeload.github.com/slurmulon/flap/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slurmulon%2Fflap/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266140240,"owners_count":23882636,"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":["clause","functional-programming","guard","guard-clauses","pattern-matching"],"created_at":"2024-10-29T09:32:17.220Z","updated_at":"2025-07-20T14:33:05.747Z","avatar_url":"https://github.com/slurmulon.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# flap\n\n\u003e :rooster: Guard clauses for JS\n\n-----\n\n## Summary\n\n`flap` allows you to cleanly enforce integrity conditions and modifications to the inputs and outputs of functions.\n\nYou can also think of it as a generic datal-flow wrapper for functions, with a dash of pattern-matching awesomeness.\n\n## Features\n\n * Wraps JS functions and their arguments with [guard clauses](https://sourcemaking.com/refactoring/replace-nested-conditional-with-guard-clauses) found in languages such as Elixir and Haskell\n * Elegantly modifies and reacts to arguments based on expressions\n * Pattern matching against object arguments\n * Improves readability of complex conditions by chaining discrete units of logic\n * Helps prevent deep nesting and callback hell\n * Optionally bind to `Function.prototype` for maximum sugar\n\n## Installation\n\n```sh\nnpm i flap\n```\n\n## Documentation\n\nYou can find detailed documentation and examples at [https://flap.js.org](https://flap.js.org).\n\n## Contributing\n\nContributions are always welcome! Simply open a PR with completely covered tests.\n\n```sh\nnpm run coverage\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fslurmulon%2Fflap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fslurmulon%2Fflap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fslurmulon%2Fflap/lists"}