{"id":17228191,"url":"https://github.com/decompil3d/from2-error","last_synced_at":"2025-03-25T18:41:47.491Z","repository":{"id":18935166,"uuid":"85617037","full_name":"decompil3d/from2-error","owner":"decompil3d","description":"Create a stream that immediately emits the specified Error. Sugary wrapper around from2.","archived":false,"fork":false,"pushed_at":"2022-01-25T18:39:05.000Z","size":102,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-01-30T16:20:00.953Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/decompil3d.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":"2017-03-20T19:21:58.000Z","updated_at":"2022-01-25T18:26:50.000Z","dependencies_parsed_at":"2022-07-25T06:47:04.951Z","dependency_job_id":null,"html_url":"https://github.com/decompil3d/from2-error","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/decompil3d%2Ffrom2-error","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/decompil3d%2Ffrom2-error/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/decompil3d%2Ffrom2-error/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/decompil3d%2Ffrom2-error/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/decompil3d","download_url":"https://codeload.github.com/decompil3d/from2-error/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245524849,"owners_count":20629760,"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-10-15T04:22:03.068Z","updated_at":"2025-03-25T18:41:47.463Z","avatar_url":"https://github.com/decompil3d.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"![CI](https://github.com/decompil3d/from2-error/workflows/CI/badge.svg) [![Coverage Status](https://coveralls.io/repos/github/decompil3d/from2-error/badge.svg?branch=master)](https://coveralls.io/github/decompil3d/from2-error?branch=master)\n\n[![NPM](https://nodei.co/npm/from2-error.png?downloads=true\u0026stars=true)](https://nodei.co/npm/from2-error/)\n\n# from2-error\n\nCreate a stream that immediately emits the specified Error. Sugary wrapper around from2.\n\nUseful when you want to create a Stream for unit testing your error handlers.\n\n## Example\n\n```js\nconst from = require('from-error');\nconst through = require('through2');\n\nfrom(new Error('Test error'))\n  .on('error', err =\u003e {\n    // Handle the error here\n  })\n  .on('data', () =\u003e {\n    // This will never run\n  })\n  .on('end', () =\u003e {\n    // This will never run\n  })\n  .on('close', () =\u003e {\n    // This will emit when the stream is done\n  });\n```\n\n## Testing\n\n```sh\nnpm test\n```\n\n## License\n[MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdecompil3d%2Ffrom2-error","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdecompil3d%2Ffrom2-error","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdecompil3d%2Ffrom2-error/lists"}