# bindexof

> find the index of a Buffer in another Buffer

Latest version **1.0.1** (published 2014-10-29) · ISC license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install bindexof
pnpm add bindexof
yarn add bindexof
bun add bindexof
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2014-10-29 |
| First published | 2014-10-29 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | @jaoquimserafim |
| Maintainers | quim |
| Keywords | buffer, search, indexOf, find |

## Links

- npm: https://www.npmjs.com/package/bindexof
- Repository: https://github.com/joaquimserafim/bindexOf
- Issues: https://github.com/joaquimserafim/bindexOf/issues
- npm.io page: https://npm.io/package/bindexof

## Alternatives

- [flatbuffers](https://npm.io/package/flatbuffers.md) — 6.0M 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
- [datasets-fi-postalcodes](https://npm.io/package/datasets-fi-postalcodes.md) — 1.1K weekly downloads

## Recent versions

- 1.0.1 (latest) — 2014-10-29
- 1.0.0 — 2014-10-29

## README

# bindexOf

<a href="https://nodei.co/npm/bindexof/"><img src="https://nodei.co/npm/bindexOf.png?downloads=true"></a>

[![Build Status](https://travis-ci.org/joaquimserafim/bindexOf.png?branch=master)](https://travis-ci.org/joaquimserafim/bindexOf)


####summary
Find the index of a buffer inside another Buffer, runs pretty well for small buffers or searches that the searchValue is found near the beginning, returns the first occurrence of the specified value, starting the search at fromIndex, returns -1 if the value is not found.

**Case-sensitivity:** The `bindexOf` is case sensitive.

**Benchmark:** run `npm run bench1 && npm run bench2` to see some results.

node v0.10.\*


####app

	bindexOf(buffer, searchBuffer[, fromIndex]])
	
 **fromIndex**
*The location to start the search from. It can be any integer between 0 and the length of the buffer. The default value is 0.*

####example

	var bindexOf = require('bindexof');
	
	
	var buffer = new Buffer('Node.js is a platform built on Chrome\'s JavaScript ' +
                   'runtime for easily building fast, scalable network ' + 
                   'applications.platform');
                
                
    var buffer_to_find = new Buffer('easily');
    
    
    var find = bindexOf(buffer, buffer_to_find);
    
    console.log(find); // index 63

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