# to-arraybuffer

> Get an ArrayBuffer from a Buffer as fast as possible

Latest version **1.0.1** (published 2016-01-13) · MIT license · 0 weekly downloads

## Install

```sh
npm install to-arraybuffer
pnpm add to-arraybuffer
yarn add to-arraybuffer
bun add to-arraybuffer
```

## 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.1 |
| Published | 2016-01-13 |
| First published | 2016-01-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 20 |
| Author | John Hiesey |
| Maintainers | jhiesey |
| Keywords | buffer, to, arraybuffer, fast, read, only |

## Links

- npm: https://www.npmjs.com/package/to-arraybuffer
- Repository: https://github.com/jhiesey/to-arraybuffer
- Homepage: https://github.com/jhiesey/to-arraybuffer#readme
- Issues: https://github.com/jhiesey/to-arraybuffer/issues
- npm.io page: https://npm.io/package/to-arraybuffer

## Alternatives

- [update-check](https://npm.io/package/update-check.md) — 4.0M weekly downloads
- [react-native-onesignal](https://npm.io/package/react-native-onesignal.md) — 134.5K weekly downloads
- [react-redux-toastr](https://npm.io/package/react-redux-toastr.md) — 33.7K weekly downloads
- [@nocobase/plugin-notification-manager](https://npm.io/package/@nocobase/plugin-notification-manager.md) — 2.0K weekly downloads
- [react-simple-toasts](https://npm.io/package/react-simple-toasts.md) — 1.9K weekly downloads

## Recent versions

- 1.0.1 (latest) — 2016-01-13

## README

# to-arraybuffer [![Build Status](https://travis-ci.org/jhiesey/to-arraybuffer.svg?branch=master)](https://travis-ci.org/jhiesey/to-arraybuffer)

[![Sauce Test Status](https://saucelabs.com/browser-matrix/to-arraybuffer.svg)](https://saucelabs.com/u/to-arraybuffer)

Convert from a Buffer to an ArrayBuffer as fast as possible.

Note that in some cases the returned ArrayBuffer is backed by the same memory as the original
Buffer (but in other cases it is a copy), so **modifying the ArrayBuffer is not recommended**.

This module is designed to work both in node.js and in all browsers with ArrayBuffer support
when using [the Buffer implementation provided by Browserify](https://www.npmjs.com/package/buffer).

## Usage

``` js
var toArrayBuffer = require('to-arraybuffer')

var buffer = new Buffer(100)
// Fill the buffer with some data

var ab = toArrayBuffer(buffer)
// `ab` now contains the same data as `buffer`
```

## License

MIT

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