Awesome
Deprecated
Just use Buffer#includes()
. It has been available since Node.js 6.
buffer-includes
Node.js
buffer.includes()
ponyfill
Install
$ npm install --save buffer-includes
Usage
const bufferIncludes = require('buffer-includes');
bufferIncludes(new Buffer('unicorn'), 'corn');
//=> true
API
bufferIncludes(buffer, needle, byteOffset)
See the buffer.includes()
docs for more details.
Related
- buf-indexof - Node.js
buffer.indexOf()
ponyfill - buffer-equals - Node.js
buffer.equals()
ponyfill - buf-compare - Node.js
Buffer.compare()
ponyfill
License
MIT © Sindre Sorhus