Home

Awesome

Deprecated

Just use Buffer#includes(). It has been available since Node.js 6.


buffer-includes Build Status

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

License

MIT © Sindre Sorhus