buffer-to-uint8array
convert a buffer (or string) to a Uint8Array
example
var tou8 = ;var buf = 'whatever';var a = ;console;console;
methods
var tou8 =
var u = tou8(buf)
Convert buf
, a Buffer
or string
to a Uint8Array
.
If buf
is already a Uint8Array, it will be returned.
install
With npm do:
npm install buffer-to-uint8array
license
MIT