# buffer-indexof-polyfill

> This is a polyfill for Buffer#indexOf introduced in NodeJS 4.0.

Latest version **1.0.2** (published 2020-09-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install buffer-indexof-polyfill
pnpm add buffer-indexof-polyfill
yarn add buffer-indexof-polyfill
bun add buffer-indexof-polyfill
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2020-09-09 |
| First published | 2015-10-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.10 |
| Dependencies | 0 |
| Unpacked size | 11.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | https://github.com/sarosia |
| Maintainers | sarosia |
| Keywords | buffer, indexof, polyfill |

## Links

- npm: https://www.npmjs.com/package/buffer-indexof-polyfill
- Repository: https://github.com/sarosia/buffer-indexof-polyfill
- Homepage: https://github.com/sarosia/buffer-indexof-polyfill#readme
- Issues: https://github.com/sarosia/buffer-indexof-polyfill/issues
- npm.io page: https://npm.io/package/buffer-indexof-polyfill

## Alternatives

- [flatbuffers](https://npm.io/package/flatbuffers.md) — 6.0M weekly downloads
- [jwt-simple](https://npm.io/package/jwt-simple.md) — 259.5K weekly downloads
- [@exodus/patch-broken-hermes-typed-arrays](https://npm.io/package/@exodus/patch-broken-hermes-typed-arrays.md) — 28.5K weekly downloads
- [@native-to-anchor/buffer-layout](https://npm.io/package/@native-to-anchor/buffer-layout.md) — 12.2K weekly downloads
- [binary-parser-encoder](https://npm.io/package/binary-parser-encoder.md) — 5.3K weekly downloads

## Recent versions

- 1.0.2 (latest) — 2020-09-09
- 1.0.1 — 2016-10-02
- 1.0.0 — 2015-10-12

## README

# buffer-indexof-polyfill

[![Build Status][travis-image]][travis-url]
[![NPM Version][npm-image]][npm-url]
[![NPM Downloads][downloads-image]][downloads-url]

This is a polyfill for [`Buffer#indexOf`](https://nodejs.org/api/buffer.html#buffer_buf_indexof_value_byteoffset) and Buffer#lastIndexOf introduced in NodeJS 4.0.

## Example

```js
require("buffer-indexof-polyfill");

new Buffer("buffer").indexOf("uff") // return 1
new Buffer("buffer").indexOf("abc") // return -1
```

## Installation

```bash
npm install buffer-indexof-polyfill
```

## License

[MIT](LICENSE)

[npm-image]: https://img.shields.io/npm/v/buffer-indexof-polyfill.svg
[npm-url]: https://npmjs.org/package/buffer-indexof-polyfill
[downloads-image]: https://img.shields.io/npm/dm/buffer-indexof-polyfill.svg
[downloads-url]: https://npmjs.org/package/buffer-indexof-polyfill
[travis-image]: https://travis-ci.org/sarosia/buffer-indexof-polyfill.svg?branch=master
[travis-url]: https://travis-ci.org/sarosia/buffer-indexof-polyfill

---
_Source: https://npm.io/package/buffer-indexof-polyfill · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
