# endian-toggle

> toggle the byte ordering of a buffer

Latest version **0.0.0** (published 2012-11-01) · MIT license · 0 weekly downloads

## Install

```sh
npm install endian-toggle
pnpm add endian-toggle
yarn add endian-toggle
bun add endian-toggle
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.0 |
| Published | 2012-11-01 |
| First published | 2012-11-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | James Halliday |
| Maintainers | substack |
| Keywords | endian, binary, byte, order, encoding |

## Links

- npm: https://www.npmjs.com/package/endian-toggle
- Repository: https://github.com/substack/endian-toggle
- npm.io page: https://npm.io/package/endian-toggle

## 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

- 0.0.0 (latest) — 2012-11-01

## README

# endian-toggle

Toggle the byte ordering of a buffer.

[![build status](https://secure.travis-ci.org/substack/endian-toggle.png)](http://travis-ci.org/substack/endian-toggle)

# example

``` js
var toggle = require('endian-toggle');
var buf = new Buffer('abcd');

console.dir(buf);
console.dir(toggle(buf, 16));
```

***

```
<Buffer 61 62 63 64>
<Buffer 62 61 64 63>
```

# methods

``` js
var toggle = require('endian-toggle')
```

## toggle(buf, bits)

Return a new buffer from `buf` with toggled endianness at `bits` many bits.

# install

With [npm](https://npmjs.org) do:

```
npm install endian-toggle
```

# license

MIT

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