{"id":17676640,"url":"https://github.com/yoannchb-pro/pipipe","last_synced_at":"2026-05-19T04:31:59.229Z","repository":{"id":86697921,"uuid":"603591708","full_name":"yoannchb-pro/pipipe","owner":"yoannchb-pro","description":"Create pipeline, execute them, modify them, copy them ...","archived":false,"fork":false,"pushed_at":"2023-02-26T17:25:21.000Z","size":22,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-30T17:33:28.544Z","etag":null,"topics":["async","copy","create","javascript","modify","pipe","pipeline","typescript"],"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/yoannchb-pro.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-02-19T01:14:21.000Z","updated_at":"2023-08-26T14:19:29.000Z","dependencies_parsed_at":"2023-03-13T19:54:53.899Z","dependency_job_id":null,"html_url":"https://github.com/yoannchb-pro/pipipe","commit_stats":{"total_commits":6,"total_committers":1,"mean_commits":6.0,"dds":0.0,"last_synced_commit":"6bea8e60434674846696f65d71b748b907fbd855"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/yoannchb-pro/pipipe","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yoannchb-pro%2Fpipipe","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yoannchb-pro%2Fpipipe/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yoannchb-pro%2Fpipipe/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yoannchb-pro%2Fpipipe/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yoannchb-pro","download_url":"https://codeload.github.com/yoannchb-pro/pipipe/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yoannchb-pro%2Fpipipe/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265711123,"owners_count":23815475,"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":["async","copy","create","javascript","modify","pipe","pipeline","typescript"],"created_at":"2024-10-24T07:26:15.658Z","updated_at":"2026-05-19T04:31:54.201Z","avatar_url":"https://github.com/yoannchb-pro.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pipipe\n\nCreate pipeline, execute them, modify them, copy them ...\n\n## Update\n\n- See [changelog](CHANGELOG.md)\n\n## Found a bug ?\n\n- Tell it in my github issues dont be afraid :)\n\n## Installation\n\n```\nnpm i pipipe\n```\n\n## Import\n\n```js\nconst createPipeline = require(\"pipipe\");\n// OR\nimport createPipeline from \"pipipe\";\n```\n\nOr in the browser\n\n```html\n\u003cscript src=\"https://unpkg.com/pipipe@1.0.0/dist/index.js\"\u003e\u003c/script\u003e\n```\n\n## How to use ?\n\n### Simple example\n\n```ts\nconst reverseStrPipeline = createPipe()\n  .pipe((str: string) =\u003e str.split(\"\"))\n  .pipe((arr: string[]) =\u003e arr.reverse())\n  .pipe((arr: string[]) =\u003e arr.join(\"\"));\n\nconst result = reverseStrPipeline.execute(\"hello world\");\n\nconsole.log(result); //dlrow olleh\n```\n\n### Copy\n\nCopy a pipeline to create a new one from it\n\n```ts\nconst lowerCasePipeline = createPipe().pipe((str: string) =\u003e str.toLowerCase());\nconst splitPipepline = lowerCasePipeline\n  .copy()\n  .pipe((str: string) =\u003e str.split(\"\"));\n\nconsole.log(\n  splitPipepline.execute(\"HI\"), // \"hi\"\n  lowerCasePipeline.execute(\"HI\") // [\"h\", \"i\"]\n);\n```\n\n### Async\n\nExecute asynchronously the pipeline\n\n```ts\ntype UserList = { id: string; name: string; token: string }[];\n\nconst getUserTokenPipeline = createPipe()\n  .pipe(async (id: string) =\u003e {\n    const req = await fetch(`/userById/${id}`);\n    return await req.json();\n  })\n  .pipe((result: UserList) =\u003e result[0]?.token)\n  .catch(handleErr);\n\nconst token = await getUserTokenPipeline.executeAsync(\"123456789\");\n```\n\n### pipeInsert\n\nInsert a new pipe to a specific position\n\n```ts\nconst reverseStrPipeline = createPipe()\n  .pipe((str: string) =\u003e str.split(\"\"))\n  .pipe((arr: string[]) =\u003e arr.join(\"\"))\n  .pipeInsert((arr: string[]) =\u003e arr.reverse(), 1);\n\nconst result = reverseStrPipeline.execute(\"hello world\");\n\nconsole.log(result); //dlrow olleh\n```\n\n### pop, shift, splice\n\nSame as the pop, shift, splice array method to remove pipe(s) from the pipeline\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyoannchb-pro%2Fpipipe","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyoannchb-pro%2Fpipipe","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyoannchb-pro%2Fpipipe/lists"}