Package Exports
- to-data-view
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 (to-data-view) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
To DataView
Create a DataView over an ArrayBuffer/8-bit typed array (commonly used in the browsers) or a Buffer (commonly used in Node.js).
Supported inputs:
Installation
npm install --save to-data-viewUsage
const toDataView = require('to-data-view')
// This function will accept both `ArrayBuffer` and `Buffer` as input
function awesomeParser (source) {
const view = toDataView(source)
// ...
}API
toDataView(data: ArrayBuffer | Buffer | Int8Array | Uint8Array | Uint8ClampedArray): DataView
Return a DataView instance that uses the same memory as the provided ArrayBuffer, 8-bit typed array or Buffer.