{"id":27916926,"url":"https://github.com/fent/node-stream-equal","last_synced_at":"2025-05-06T16:43:49.855Z","repository":{"id":4046886,"uuid":"5148992","full_name":"fent/node-stream-equal","owner":"fent","description":"Test that two readable streams are equal to each other.","archived":false,"fork":false,"pushed_at":"2023-05-11T03:45:37.000Z","size":243,"stargazers_count":29,"open_issues_count":0,"forks_count":6,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-08-10T21:43:15.543Z","etag":null,"topics":["node","stream","testing"],"latest_commit_sha":null,"homepage":null,"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/fent.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,"governance":null}},"created_at":"2012-07-23T07:53:49.000Z","updated_at":"2024-05-29T07:52:58.000Z","dependencies_parsed_at":"2023-07-05T20:16:32.229Z","dependency_job_id":null,"html_url":"https://github.com/fent/node-stream-equal","commit_stats":{"total_commits":102,"total_committers":7,"mean_commits":"14.571428571428571","dds":"0.11764705882352944","last_synced_commit":"b52238d2e466f2280497df78754a4fea7f2d7fd0"},"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fent%2Fnode-stream-equal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fent%2Fnode-stream-equal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fent%2Fnode-stream-equal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fent%2Fnode-stream-equal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fent","download_url":"https://codeload.github.com/fent/node-stream-equal/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252722772,"owners_count":21794127,"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":["node","stream","testing"],"created_at":"2025-05-06T16:43:49.080Z","updated_at":"2025-05-06T16:43:49.847Z","avatar_url":"https://github.com/fent.png","language":"TypeScript","funding_links":["https://tidelift.com/security"],"categories":[],"sub_categories":[],"readme":"# node-stream-equal\n\nTest that two readable streams are equal to each other.\n\n![Depfu](https://img.shields.io/depfu/fent/node-stream-equal)\n[![codecov](https://codecov.io/gh/fent/node-stream-equal/branch/master/graph/badge.svg)](https://codecov.io/gh/fent/node-stream-equal)\n\n# Usage\n\n```js\nconst streamEqual = require('stream-equal');\nconst fs = require('fs');\n\nlet readStream1 = fs.createReadStream(file);\nlet readStream2 = fs.createReadStream(file);\nlet equal = await streamEqual(readStream1, readStream2);\n```\n\n\n# Motive\nUseful for testing. This method of comparing is faster and uses less memory than buffering entire streams and comparing their content, specially for bigger files.\n\nYou could also get the hash sum of a stream to test it against another stream. Which is similar to what this library does, without the hashing.\n\n\n# API\n### async streamEqual(readStream1, readStream2)\n\nA function that compares each `data` event on both streams, pausing when needed to keep them in sync. Returns a proimse that resolves to either `true` or `false`.\n\n\n# Install\n\n    npm install stream-equal\n\n\n# Tests\nTests are written with [mocha](https://mochajs.org)\n\n```bash\nnpm test\n```\n\n## Security contact information\n\nTo report a security vulnerability, please use the\n[Tidelift security contact](https://tidelift.com/security).\nTidelift will coordinate the fix and disclosure.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffent%2Fnode-stream-equal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffent%2Fnode-stream-equal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffent%2Fnode-stream-equal/lists"}