{"id":22357752,"url":"https://github.com/bluzi/paipu","last_synced_at":"2025-07-30T10:33:24.630Z","repository":{"id":57318274,"uuid":"128451012","full_name":"bluzi/paipu","owner":"bluzi","description":":rocket: Yet another streaming library for Node (UNDER DEVELOPMENT)","archived":false,"fork":false,"pushed_at":"2018-10-01T05:11:23.000Z","size":50,"stargazers_count":6,"open_issues_count":1,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-29T08:15:50.031Z","etag":null,"topics":[],"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/bluzi.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2018-04-06T19:14:45.000Z","updated_at":"2018-06-07T11:12:34.000Z","dependencies_parsed_at":"2022-08-25T22:41:43.753Z","dependency_job_id":null,"html_url":"https://github.com/bluzi/paipu","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bluzi%2Fpaipu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bluzi%2Fpaipu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bluzi%2Fpaipu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bluzi%2Fpaipu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bluzi","download_url":"https://codeload.github.com/bluzi/paipu/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228124558,"owners_count":17873170,"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-12-04T14:16:11.517Z","updated_at":"2024-12-04T14:16:12.264Z","avatar_url":"https://github.com/bluzi.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n## paipu \nPiapue is Japanese for Pipe, and it's also a pipes library for Node. \n\n### Install\n```\nnpm i paipu\n```\n\n### Usage\n\nYou can throw anything into the pipe:\n* Functions and Promises will be evaluated and the result will be the context for the next pipe\n* Other pipes will extend the current pipe\n* Anything else will set the context for the rest of the pipe\n\nTo execute a pipe, call `resolve()` at the end of it.\n\n### Examples\nSimple pipe:\n```js\nconst paipu = require('paipu');\n\nconst result = \n\tawait paipu\n\t\t.pipe('hello')\n\t\t.pipe(context =\u003e context.substr(0, 4))\n\t\t.resolve();\n\n// Result = 'hell'\n```\n\nPipe with promises:\n```js\nconst  paipu  =  require('paipu');\n\nconst  result  =\n\tawait paipu\n\t\t.pipe('abcdefg')\n\t\t.pipe(async context =\u003e context.substr(0, 3))\n\t\t.resolve();\n\n// Result = 'abc'\n```\n\nPipe with nested pipes:\n```js\nconst paipu = require('paipu');\n\nconst encrypt =  \n\tpaipu\n\t\t.pipe(context =\u003e context.replace('a', 'b'))\n\t\t.pipe(context =\u003e context.replace('c', 'd'))\n  \n\nconst result =\n\tawait paipu\n\t\t.pipe('abcdefg')\n\t\t.pipe(encrypt)\n\t\t.resolve();\n\t\t\n// Result = 'bbddefg'\n```\n\nThere are also before/after pipe hooks and aliases:\n```js\nconst paipu = require('paipu');\n\npaipu\n\t.beforePipe((alias, context) =\u003e console.log(`executing '${alias}'...`))\n\t.afterPipe((alias, context) =\u003e console.log(`'${alias}' has finished!`))\n\t.pipe('throw in a string', 'abcdefg')\n\t.pipe('cut that goddamn string', async context =\u003e context.substr(0, 3))\n\t.resolve();\n```\nAnd they will effect nested pipes too!\n\n### Contribution\n\nAny type of feedback, pull request or issue is welcome\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbluzi%2Fpaipu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbluzi%2Fpaipu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbluzi%2Fpaipu/lists"}