{"id":15113896,"url":"https://github.com/sindresorhus/buffer-equals","last_synced_at":"2025-10-22T21:21:19.734Z","repository":{"id":31339132,"uuid":"34901807","full_name":"sindresorhus/buffer-equals","owner":"sindresorhus","description":"Node.js 0.12 buffer.equals() ponyfill","archived":true,"fork":false,"pushed_at":"2021-01-23T08:25:22.000Z","size":50,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":9,"default_branch":"main","last_synced_at":"2024-10-29T22:38:21.946Z","etag":null,"topics":["deprecated"],"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/sindresorhus.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},"funding":{"github":"sindresorhus","open_collective":"sindresorhus","custom":"https://sindresorhus.com/donate"}},"created_at":"2015-05-01T12:26:37.000Z","updated_at":"2023-01-28T10:57:09.000Z","dependencies_parsed_at":"2022-09-11T02:00:37.476Z","dependency_job_id":null,"html_url":"https://github.com/sindresorhus/buffer-equals","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sindresorhus%2Fbuffer-equals","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sindresorhus%2Fbuffer-equals/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sindresorhus%2Fbuffer-equals/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sindresorhus%2Fbuffer-equals/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sindresorhus","download_url":"https://codeload.github.com/sindresorhus/buffer-equals/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234450709,"owners_count":18834569,"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":["deprecated"],"created_at":"2024-09-26T01:40:19.538Z","updated_at":"2025-09-27T17:31:42.823Z","avatar_url":"https://github.com/sindresorhus.png","language":"JavaScript","readme":"# buffer-equals [![Build Status](https://travis-ci.org/sindresorhus/buffer-equals.svg?branch=master)](https://travis-ci.org/sindresorhus/buffer-equals)\n\n\u003e Node.js [`buffer.equals()`](https://nodejs.org/api/buffer.html#buffer_buf_equals_otherbuffer) [ponyfill](https://ponyfill.com)\n\n**Deprecated: Just use [`Buffer#equals()`](https://nodejs.org/api/buffer.html#buffer_buf_equals_otherbuffer). It has been available since Node.js 0.12.**\n\n\n## Install\n\n```\n$ npm install --save buffer-equals\n```\n\n\n## Usage\n\n```js\nconst bufferEquals = require('buffer-equals');\n\nbufferEquals(new Buffer('foo'), new Buffer('foo'));\n//=\u003e true\n\nbufferEquals(new Buffer('foo'), new Buffer('bar'));\n//=\u003e false\n```\n\n\n## API\n\nSee the [`buffer.equals()` docs](https://nodejs.org/api/buffer.html#buffer_buf_equals_otherbuffer).\n\nThe only difference is that you pass in the buffer as the first argument instead of calling the `.equals()` method on the buffer instance.\n\n\n## Related\n\n- [buffer-equals-constant](https://github.com/sindresorhus/buffer-equals-constant) - Check if two buffers have the same bytes in constant time\n- [buf-compare](https://github.com/sindresorhus/buf-compare) - Node.js 0.12 `Buffer.compare()` ponyfill\n- [buf-indexof](https://github.com/sindresorhus/buf-indexof) - Node.js 4.0 `buffer.indexOf()` ponyfill\n\n\n## License\n\nMIT © [Sindre Sorhus](https://sindresorhus.com)\n","funding_links":["https://github.com/sponsors/sindresorhus","https://opencollective.com/sindresorhus","https://sindresorhus.com/donate"],"categories":["Packages","Number"],"sub_categories":["Polyfills Node.js","Polyfills"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsindresorhus%2Fbuffer-equals","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsindresorhus%2Fbuffer-equals","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsindresorhus%2Fbuffer-equals/lists"}