Package Exports
- buffer-to-uint8array
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (buffer-to-uint8array) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
buffer-to-uint8array
convert a buffer (or string) to a Uint8Array
example
var tou8 = require('buffer-to-uint8array');
var buf = new Buffer('whatever');
var a = tou8(buf);
console.log(a.constructor.name);
console.log(a);methods
var tou8 = require('buffer-to-uint8array')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-uint8arraylicense
MIT