# hex-to-array-buffer

> Turn a string of hexadecimal characters into an `ArrayBuffer`.

Latest version **2.0.0** (published 2021-07-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install hex-to-array-buffer
pnpm add hex-to-array-buffer
yarn add hex-to-array-buffer
bun add hex-to-array-buffer
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2021-07-24 |
| First published | 2016-08-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM |
| Node | ^12.20.0 \|\| ^14.13.1 \|\| >=16.0.0 |
| Dependencies | 0 |
| Unpacked size | 4.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 10 |
| Maintainers | linusu |
| Keywords | ArrayBuffer, conversion, hex, hexadecimal, string |

## Links

- npm: https://www.npmjs.com/package/hex-to-array-buffer
- Repository: https://github.com/LinusU/hex-to-array-buffer
- Homepage: https://github.com/LinusU/hex-to-array-buffer#readme
- Issues: https://github.com/LinusU/hex-to-array-buffer/issues
- npm.io page: https://npm.io/package/hex-to-array-buffer

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

- 2.0.0 (latest) — 2021-07-24
- 1.1.0 — 2017-10-19
- 1.0.0 — 2017-10-19
- 0.1.0 — 2016-08-14

## README

# hex-to-array-buffer

Turn a string of hexadecimal characters into an `ArrayBuffer`.

## Installation

```sh
npm install --save hex-to-array-buffer
```

## Usage

```js
import hexToArrayBuffer from 'hex-to-array-buffer'

const buffer = hexToArrayBuffer('ceae96a325e1dc5dd4f405d905049ceb')

console.log(buffer)
//=> ArrayBuffer { byteLength: 16 }
```

## API

### `hexToArrayBuffer(input)`

- `input` (`string`, required) - specified as a string of hexadecimal characters
- returns `ArrayBuffer` - a new ArrayBuffer with the binary content from `input`

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