This package has been deprecated

Author message:

Just use `Buffer#indexOf()`. It has been available since Node.js 4.

buf-indexof

2.0.0 • Public • Published

Deprecated

Just use Buffer#indexOf(). It has been available since Node.js 4.


buf-indexof Build Status

Node.js Buffer#indexOf() ponyfill

Install

$ npm install --save buf-indexof

Usage

var bufIndexof = require('buf-indexof');

bufIndexof(new Buffer('unicorn'), 'corn');
//=> 3

API

See the buffer.indexOf() docs.

The only difference is that you pass in the buffer as the first argument instead of calling the .indexOf() method on the buffer instance.

Related

License

MIT © Sindre Sorhus

Package Sidebar

Install

npm i buf-indexof

Weekly Downloads

354

Version

2.0.0

License

MIT

Unpacked Size

4.07 kB

Total Files

4

Last publish

Collaborators

  • sindresorhus