{"id":18345916,"url":"https://github.com/ndhoule/compose","last_synced_at":"2025-04-09T22:40:55.492Z","repository":{"id":27816948,"uuid":"31306507","full_name":"ndhoule/compose","owner":"ndhoule","description":"Compose a list of functions into a single function.","archived":false,"fork":false,"pushed_at":"2016-05-02T20:02:23.000Z","size":16,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-09T09:41:35.525Z","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/ndhoule.png","metadata":{"files":{"readme":"README.md","changelog":"HISTORY.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-02-25T09:36:41.000Z","updated_at":"2016-04-29T22:59:47.000Z","dependencies_parsed_at":"2022-07-24T15:17:13.752Z","dependency_job_id":null,"html_url":"https://github.com/ndhoule/compose","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ndhoule%2Fcompose","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ndhoule%2Fcompose/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ndhoule%2Fcompose/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ndhoule%2Fcompose/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ndhoule","download_url":"https://codeload.github.com/ndhoule/compose/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248124848,"owners_count":21051757,"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-11-05T21:09:53.287Z","updated_at":"2025-04-09T22:40:55.470Z","avatar_url":"https://github.com/ndhoule.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# compose [![CI][ci-badge]][ci-link]\n\nCompose a list of functions into a single function.\n\n## Installation\n\n```sh\n$ component install ndhoule/compose\n$ npm install @ndhoule/compose\n```\n\n## API\n\n### `compose(...funcs: Function)`\n\nCreates a function that is the [composition](https://en.wikipedia.org/wiki/Function_composition) of a list of functions, where each function is passed the return value of the previous function.\n\nCompose is right-associative, which means functions are called in right-to-left order. For example, the operation `h(g(f()))` is represented as `compose(h, g, f)`.\n\n```javascript\nvar add = function(a, b) { return a + b; };\nvar square = function(x) { return x * x; };\nvar addThenSquare = compose(square, add);\n\naddThenSquare(1, 2); //=\u003e 9\n```\n\n## License\n\nReleased under the [MIT license](LICENSE.md).\n\n[ci-link]: https://travis-ci.org/ndhoule/compose\n[ci-badge]: https://travis-ci.org/ndhoule/compose.svg?branch=master\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fndhoule%2Fcompose","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fndhoule%2Fcompose","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fndhoule%2Fcompose/lists"}