{"id":19886149,"url":"https://github.com/kyeotic/compose-func","last_synced_at":"2026-06-09T12:31:43.239Z","repository":{"id":57204905,"uuid":"65849998","full_name":"kyeotic/compose-func","owner":"kyeotic","description":"A dependency-free Node v0.10.x compatible right-to-left compose function","archived":false,"fork":false,"pushed_at":"2016-08-16T21:06:44.000Z","size":4,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-20T01:09:50.799Z","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/kyeotic.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-08-16T20:06:40.000Z","updated_at":"2016-09-23T05:39:05.000Z","dependencies_parsed_at":"2022-09-26T17:30:33.666Z","dependency_job_id":null,"html_url":"https://github.com/kyeotic/compose-func","commit_stats":null,"previous_names":["tyrsius/compose-func"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/kyeotic/compose-func","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kyeotic%2Fcompose-func","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kyeotic%2Fcompose-func/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kyeotic%2Fcompose-func/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kyeotic%2Fcompose-func/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kyeotic","download_url":"https://codeload.github.com/kyeotic/compose-func/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kyeotic%2Fcompose-func/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34107865,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-09T02:00:06.510Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-11-12T17:36:23.319Z","updated_at":"2026-06-09T12:31:43.198Z","avatar_url":"https://github.com/kyeotic.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# compose-func\nA dependency-free right-to-left compose function that will run anywhere\n\nnpm has several packages for function composition, and they are all too heavy for my liking. This operation is simple; it doesn't require dependencies, and it doesn't need gulp/grunt to transpile ES6.\n\nThis package\n\n* Has no dependencies\n* Has no build step\n* Is supported by all node environments ***without any polyfills***\n* Has no tests (YAGNI)\n* Is 12 lines of code\n* Works\n\n# Usage\n\n```javascript\nvar compose = require('compose-func');\n\nvar add1 = (x) =\u003e x + 1,\nmult2 = (x) =\u003e x * 2,\nsquare = (x) =\u003e x * x;\n\nvar compose1 = compose(add1),\ncompose2 = compose(mult2, add1),\ncompose3 = compose(square, mult2, add1);\n\ncompose1(0); // 1\n// === add1(0)\n\ncompose2(1); // 4\n// === mult2(add1(0))\n\ncompose3(1); // 16\n// === square(mult2(add1(0)))\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkyeotic%2Fcompose-func","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkyeotic%2Fcompose-func","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkyeotic%2Fcompose-func/lists"}