Skip to content

Commit

Permalink
Add buffer-equal replacement
Browse files Browse the repository at this point in the history
  • Loading branch information
stramel committed Nov 11, 2024
1 parent d501018 commit f9cfe0f
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
11 changes: 11 additions & 0 deletions docs/modules/buffer-equal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# `buffer-equal`/`buffer-equals`

[`buffer-equal`](https://www.npmjs.com/package/buffer-equal) and [`buffer-equals`](https://www.npmjs.com/package/buffer-equals) recommends that you switch away from them to native `Buffer.prototype.equals` which has been available since Node.js v0.11.13

# Alternative(s)

## Native `Buffer.prototype.equals`

For most cases, native Node.js `Buffer.prototype.equals` is enough.

[NodeJS Docs](https://nodejs.org/api/buffer.html#bufequalsotherbuffer)
12 changes: 12 additions & 0 deletions manifests/preferred.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,18 @@
"docPath": "bluebird-q",
"category": "preferred"
},
{
"type": "documented",
"moduleName": "buffer-equal",
"docPath": "buffer-equal",
"category": "preferred"
},
{
"type": "documented",
"moduleName": "buffer-equals",
"docPath": "buffer-equal",
"category": "preferred"
},
{
"type": "documented",
"moduleName": "builtin-modules",
Expand Down

0 comments on commit f9cfe0f

Please sign in to comment.