buffer-to-typed-array

convert buffers to typed arrays

Usage no npm install needed!

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

README

buffer-to-typed-array

converts Buffers to TypedArrays.

stable

install

with npm, do:

npm i --save buffer-to-typed-array

usage

var toTypedArray = require('buffer-to-typed-array');
var toInt16 = toTypedArray('int16')
var buf = new Buffer([0x01, 0x02, 0x03, 0x04])
var arr = toInt16(buf)

license

ISC