array-bufferdeprecated

Cast buffers to array buffers, and vice versa.

Usage no npm install needed!

<script type="module">
  import arrayBuffer from 'https://cdn.skypack.dev/array-buffer';
</script>

README

Array Buffer

Build Status npm Version License

Cast buffers to array buffers, and vice versa.

$ npm install array-buffer

Usage

This module exports two functions, toBuffer and toArrayBuffer.

import { toBuffer, toArrayBuffer } from 'array-buffer'

toBuffer(new ArrayBuffer(16)) // Buffer with byte length of 16
toArrayBuffer(new Buffer(16)) // ArrayBuffer with byte length of 16

License

This software is licensed under the MIT License.