buffer-to-typed-array
converts Buffer
s to TypedArray
s.
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