{"id":17434627,"url":"https://github.com/markhaehnel/resolver-pipe","last_synced_at":"2026-01-19T06:02:32.615Z","repository":{"id":41873223,"uuid":"472764176","full_name":"markhaehnel/resolver-pipe","owner":"markhaehnel","description":"A functional pipe with validators for TypeScript","archived":false,"fork":false,"pushed_at":"2023-01-08T14:53:12.000Z","size":1175,"stargazers_count":1,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-04T16:17:32.288Z","etag":null,"topics":["functional-programming","typescript","validator"],"latest_commit_sha":null,"homepage":"","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/markhaehnel.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2022-03-22T12:46:49.000Z","updated_at":"2022-03-23T06:15:50.000Z","dependencies_parsed_at":"2023-02-08T06:15:58.063Z","dependency_job_id":null,"html_url":"https://github.com/markhaehnel/resolver-pipe","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/markhaehnel/resolver-pipe","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markhaehnel%2Fresolver-pipe","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markhaehnel%2Fresolver-pipe/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markhaehnel%2Fresolver-pipe/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markhaehnel%2Fresolver-pipe/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/markhaehnel","download_url":"https://codeload.github.com/markhaehnel/resolver-pipe/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markhaehnel%2Fresolver-pipe/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28562239,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-19T03:31:16.861Z","status":"ssl_error","status_checked_at":"2026-01-19T03:31:15.069Z","response_time":67,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["functional-programming","typescript","validator"],"created_at":"2024-10-17T09:07:59.685Z","updated_at":"2026-01-19T06:02:32.597Z","avatar_url":"https://github.com/markhaehnel.png","language":"TypeScript","readme":"# Resolver Pipe\n\n\u003cimg src=\"https://upload.wikimedia.org/wikipedia/commons/4/4c/Typescript_logo_2020.svg\" alt=\"TypeScript logo\" align=\"right\" height=\"32\" width=\"32\"/\u003e\n\n\u003ca href=\"https://www.npmjs.com/package/@markhaehnel/resolver-pipe\" rel=\"nofollow\"\u003e\u003cimg alt=\"npm\" src=\"https://img.shields.io/npm/v/@markhaehnel/resolver-pipe\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/markhaehnel/resolver-pipe/actions\"\u003e\u003cimg src=\"https://github.com/markhaehnel/resolver-pipe/actions/workflows/ci.yml/badge.svg?event=push\u0026branch=main\" alt=\"Resolver Pipe CI Status\" /\u003e\u003c/a\u003e\n\u003ca href=\"https://opensource.org/licenses/MIT\" rel=\"nofollow\"\u003e\u003cimg src=\"https://img.shields.io/github/license/markhaehnel/resolver-pipe\" alt=\"License\"\u003e\u003c/a\u003e\n\n\u003cbr /\u003e\n\nThis is a functional pipe that makes it easier and cleaner to write complex resolvers in TypeScript. A pipe automatically pipes the output of one function into the next function.\n\nIncluding a wrapper for easy input validation with [zod](https://github.com/colinhacks/zod).\n\n## Installation\n\nTo install resolver-pipe:\n\n```bash\nnpm install @markhaehnel/resolver-pipe\n```\n\n## Usage\n\n```ts\nimport resolver from \"@markhaehnel/resolver-pipe\";\n\nconst myPipe = resolver.pipe(\n  (a: number, b: number) =\u003e a + b,\n  (id: number) =\u003e `/article/${id}`\n);\n\nawait myPipe(1, 3); // =\u003e \"/article/4\"\n```\n\n### With validation\n\n```ts\nimport resolver from \"@markhaehnel/resolver-pipe\";\nimport { z } from \"zod\";\n\nconst SearchProductParams = z.object({\n  query: z.string().min(2),\n  maxPrice: z.number().positive(),\n  limit: z.number().int().optional(),\n});\n\nconst searchProductPipe = resolver.pipe(\n  resolver.zod(SearchProductParams),\n  normalizeQuery,\n  makeSearchRequest,\n  filterProducts\n);\n\n// throws if validation fails\nawait searchProductPipe({ query: \"usb charger\", maxPrice: 16.5 });\n```\n\n## Mentions\n\nThis is heavily inspired by the [resolver pipe](https://blitzjs.com/docs/resolver-server-utilities#resolver-pipe) of [blitz.js](https://blitzjs.com/). ❤️\n\n## Contributing\n\nPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.\n\nPlease make sure to update tests as appropriate.\n\n## License\n\nCreated by Mark Hähnel and released under the terms of the [MIT](https://choosealicense.com/licenses/mit/)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkhaehnel%2Fresolver-pipe","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarkhaehnel%2Fresolver-pipe","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkhaehnel%2Fresolver-pipe/lists"}