{"id":15749597,"url":"https://github.com/ksxgithub/deno-compose","last_synced_at":"2025-03-13T13:32:29.818Z","repository":{"id":40537162,"uuid":"253494908","full_name":"KSXGitHub/deno-compose","owner":"KSXGitHub","description":"pipe, pipeline, and compose functions with 64 overloads per function.","archived":false,"fork":false,"pushed_at":"2022-10-26T04:03:38.000Z","size":33,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-26T20:06:59.176Z","etag":null,"topics":["codegen","compose","deno","functional-programming","javascript","overloading","pipe","pipeline","pregeneraged","typescript"],"latest_commit_sha":null,"homepage":"https://deno.land/x/compose","language":"TypeScript","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/KSXGitHub.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":"2020-04-06T12:45:05.000Z","updated_at":"2023-06-21T23:56:18.000Z","dependencies_parsed_at":"2022-07-27T00:32:15.616Z","dependency_job_id":null,"html_url":"https://github.com/KSXGitHub/deno-compose","commit_stats":null,"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KSXGitHub%2Fdeno-compose","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KSXGitHub%2Fdeno-compose/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KSXGitHub%2Fdeno-compose/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KSXGitHub%2Fdeno-compose/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KSXGitHub","download_url":"https://codeload.github.com/KSXGitHub/deno-compose/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243414532,"owners_count":20287137,"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":["codegen","compose","deno","functional-programming","javascript","overloading","pipe","pipeline","pregeneraged","typescript"],"created_at":"2024-10-04T06:03:41.369Z","updated_at":"2025-03-13T13:32:29.506Z","avatar_url":"https://github.com/KSXGitHub.png","language":"TypeScript","readme":"# Overload Definition of Pipe and Compose\n\n`pipe`, `pipeline`, and `compose` functions with 64 overloads per function.\n\n## What's the point?\n\nThis package not only provides simple `pipe`, `pipeline`, and `compose` implementation, it also provides 64 TypeScript overloads for each function. [See [index.d.ts](./index.d.ts)]\n\n## Usage\n\n### Import as module\n\n**URLs to import from:** _(replace `:VERSION` with suitable version, which are git tags)_\n\n* GitHub User Content: `https://raw.githubusercontent.com/KSXGitHub/deno-compose/:VERSION/index.js`\n* GitHub Pages: `https://ksxgithub.github.io/deno-compose/index.js` (always master branch)\n* Deno Third-Party Modules: `https://deno.land/x/compose@:VERSION/index.js`\n\n**Code Example:**\n\n```typescript\nimport {\n  pipe,\n  pipeline,\n  compose,\n  pipeUnary,\n  pipelineUnary,\n  composeUnary,\n} from 'https://deno.land/x/compose@1.0.0/index.js'\n```\n\n### APIs\n\n#### `pipe`\n\n**Signature:** `pipe (value, ...functions) → result`\n\n```typescript\nconst y = pipe(x0, f1, f2, f3)\n```\n\nis equivalent to\n\n```typescript\nconst x1 = f1(x0)\nconst x2 = f2(x1)\nconst y = f3(x2)\n```\n\nor\n\n```typescript\nconst y = f3(f2(f1(x0)))\n```\n\n#### `pipeline`\n\n**Signature:** `pipeline (...functions) → function`\n\n```typescript\nconst fn = pipeline(f0, f1, f2, f3)\n```\n\nis equivalent to\n\n```typescript\nconst fn = (...args) =\u003e f3(f2(f1(f0(...args))))\n```\n\n#### `compose`\n\n**Signature:** `compose (...functions) → function`\n\n```typescript\nconst fn = compose(f3, f2, f1, f0)\n```\n\nis equivalent to\n\n```typescript\nconst fn = (...args) =\u003e f3(f2(f1(f0(...args))))\n```\n\n#### `pipelineUnary`\n\n**Signature:** `pipeline (...functions) → function`\n\n```typescript\nconst fn = pipe(f0, f1, f2, f3)\n```\n\nis equivalent to\n\n```typescript\nconst fn = x =\u003e f3(f2(f1(f0(x))))\n```\n\n#### `composeUnary`\n\n**Signature:** `compose (...functions) → function`\n\n```typescript\nconst fn = compose(f3, f2, f1, f0)\n```\n\nis equivalent to\n\n```typescript\nconst fn = x =\u003e f3(f2(f1(f0(x))))\n```\n\n#### `composeRight`\n\nIt is just an alias of [`pipeline`](#pipeline)\n\n#### `composeUnaryRight`\n\nIt is just an alias of [`pipelineUnary`](#pipelineunary)\n\n### Example\n\n```typescript\n// pipe\nconst y0 = pipe(x, f1, f2, f3, f4)\n\n// pipeline\nconst g1 = pipeline(f0, f1, f2, f3, f4)\nconst y1 = g1(...args)\n\n// compose\nconst g2 = compose(f4, f3, f2, f1, f0)\nconst y2 = g2(...args)\n```\n\n## Development\n\n### Code Style\n\nThis project is formatted according to [sane-fmt](https://github.com/KSXGitHub/sane-fmt/).\n\n## License\n\n[MIT](https://git.io/JvNN2) © [Hoàng Văn Khải](https://github.com/KSXGitHub/)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fksxgithub%2Fdeno-compose","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fksxgithub%2Fdeno-compose","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fksxgithub%2Fdeno-compose/lists"}