Skip to content
This repository has been archived by the owner on Jan 23, 2021. It is now read-only.

Node.js `buffer.includes()` ponyfill

License

Notifications You must be signed in to change notification settings

sindresorhus/buffer-includes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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