Package Exports
- buffer-to-arraybuffer
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-arraybuffer) 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-arraybuffer
Convert Buffer to ArrayBuffer
Install
npm install buffer-to-arraybufferUsage
var bufferToArrayBuffer = require('buffer-to-arraybuffer');
var b = new Buffer(12);
b.write('abc', 0);
var ab = bufferToArrayBuffer(b);
String.fromCharCode.apply(null, new Uint8Array(ab)); // 'abc'NOTE: If you only target node v4.3+, you can simply just do:
new Buffer([12]).bufferLicense
MIT