{"id":13716592,"url":"https://github.com/microauth/micro-compose","last_synced_at":"2025-05-07T06:30:33.040Z","repository":{"id":57296393,"uuid":"88038955","full_name":"microauth/micro-compose","owner":"microauth","description":"Higher-order \"compose\" function","archived":false,"fork":false,"pushed_at":"2020-06-03T09:19:08.000Z","size":2491,"stargazers_count":24,"open_issues_count":3,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-18T09:25:47.409Z","etag":null,"topics":["higher-order"],"latest_commit_sha":null,"homepage":"","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/microauth.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2017-04-12T10:18:44.000Z","updated_at":"2022-10-09T19:34:16.000Z","dependencies_parsed_at":"2022-09-07T01:51:13.872Z","dependency_job_id":null,"html_url":"https://github.com/microauth/micro-compose","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microauth%2Fmicro-compose","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microauth%2Fmicro-compose/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microauth%2Fmicro-compose/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microauth%2Fmicro-compose/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/microauth","download_url":"https://codeload.github.com/microauth/micro-compose/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252826606,"owners_count":21810147,"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":["higher-order"],"created_at":"2024-08-03T00:01:12.227Z","updated_at":"2025-05-07T06:30:32.772Z","avatar_url":"https://github.com/microauth.png","language":"JavaScript","readme":"# micro-compose\n\n\u003e Higher-order `compose` function\n\n[![Build Status](https://travis-ci.org/microauth/micro-compose.svg?branch=master)](https://travis-ci.org/microauth/micro-compose)\n[![XO code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg)](https://github.com/sindresorhus/xo)\n[![Greenkeeper badge](https://badges.greenkeeper.io/microauth/micro-compose.svg)](https://greenkeeper.io/)\n\n`Compose` function from [micro-hoofs](https://github.com/KaleoSoftware/micro-hoofs) extracted into separate npm package and a bit modified.\n\n### Install\n\n```sh\nnpm install --save micro-compose\n# or\nyarn add micro-compose\n```\n\n### Usage\n\n```js\n\nimport test from 'ava';\nimport compose from './../';\n\nconst first = fn =\u003e (arg1, arg2) =\u003e {\n  return fn(arg1, arg2, 'third');\n};\n\nconst second = fn =\u003e (...args) =\u003e {\n  args.push('another one');\n  return fn(...args);\n};\n\ntest('should compose correct', async t =\u003e {\n  const composed = compose(\n    first,\n    second\n  )(async (...args) =\u003e {\n    t.is(args.length, 4);\n    t.is(args[0], 'first');\n    t.is(args[1], 'second');\n    t.is(args[2], 'third');\n    t.is(args[3], 'another one');\n  });\n\n  await composed('first', 'second');\n});\n\n```\n","funding_links":[],"categories":["Modules"],"sub_categories":["Higher Order"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmicroauth%2Fmicro-compose","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmicroauth%2Fmicro-compose","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmicroauth%2Fmicro-compose/lists"}