{"id":13740101,"url":"https://github.com/haskellcamargo/babel-plugin-function-composition","last_synced_at":"2025-04-12T15:30:56.275Z","repository":{"id":82686710,"uuid":"101960913","full_name":"haskellcamargo/babel-plugin-function-composition","owner":"haskellcamargo","description":"Babel plugin to compose functions with piping using the \u0026 operator","archived":false,"fork":false,"pushed_at":"2018-08-10T11:44:53.000Z","size":29,"stargazers_count":62,"open_issues_count":0,"forks_count":7,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-04-25T13:01:27.710Z","etag":null,"topics":[],"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/haskellcamargo.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":"2017-08-31T04:57:59.000Z","updated_at":"2024-08-03T04:07:07.591Z","dependencies_parsed_at":"2023-03-12T16:27:17.923Z","dependency_job_id":null,"html_url":"https://github.com/haskellcamargo/babel-plugin-function-composition","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haskellcamargo%2Fbabel-plugin-function-composition","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haskellcamargo%2Fbabel-plugin-function-composition/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haskellcamargo%2Fbabel-plugin-function-composition/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haskellcamargo%2Fbabel-plugin-function-composition/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/haskellcamargo","download_url":"https://codeload.github.com/haskellcamargo/babel-plugin-function-composition/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248589343,"owners_count":21129590,"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":[],"created_at":"2024-08-03T04:00:42.605Z","updated_at":"2025-04-12T15:30:55.683Z","avatar_url":"https://github.com/haskellcamargo.png","language":"JavaScript","funding_links":[],"categories":["Plugins"],"sub_categories":["Syntax Sugar"],"readme":"# babel-plugin-function-composition\n\nThis plugin is made to work with point-free (tacit) functional programming by composing functions\nover piping. It is inspired by the work of [babel-plugin-pipe-operator-curry](https://github.com/Swizz/babel-plugin-pipe-operator-curry),\nbut with a very different purpose, with focus on omitting arguments. I've overloaded the operator `\u0026` for that. You\ncan built more complex functions from simple ones.\n\n## Examples\n\n```javascript\nimport { add, multiply } from 'ramda';\n\nconst add5AndMul5 = add(5) \u0026 multiply(5);\n```\n\nTurn into\n\n```javascript\nimport { add, multiply } from 'ramda';\n\nconst add5AndMul5 = (...args) =\u003e multiply(5)(add(5)(...args));\n```\n\n## Disabling in current scope\n\nIf you want to use the original bitwise and operator, you can disable this plugin in\ncurrent scope (and it children scopes) using `'no composition'` directive.\n\n## Installation\n\n```sh\n$ npm install --save-dev babel-plugin-function-composition\n```\n\n## Usage\n\n### Via `.babelrc` (Recommended)\n\n**.babelrc**\n\n```json\n{\n  \"plugins\": [\"function-composition\"]\n}\n```\n\n### Via CLI\n\n```sh\n$ babel --plugins function-composition script.js\n```\n\n### Via Node API\n\n```javascript\nrequire('babel-core').transform('code', {\n  plugins: ['function-composition']\n});\n```\n\n# License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhaskellcamargo%2Fbabel-plugin-function-composition","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhaskellcamargo%2Fbabel-plugin-function-composition","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhaskellcamargo%2Fbabel-plugin-function-composition/lists"}