Nearsighted Paramecium Multiverse

    to-data-view
    TypeScript icon, indicating that this package has built-in type declarations

    2.0.0 • Public • Published

    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-view

    Usage

    import toDataView from 'to-data-view'
    
    // This function will accept both `ArrayBuffer` and `Buffer` as input
    function awesomeParser (source) {
      const view = toDataView(source)
    
      // ...
    }

    API

    toDataView(data)

    • data (ArrayBuffer | Int8Array | Uint8Array | Uint8ClampedArray, required)
    • returns DataView

    Return a DataView instance that uses the same memory as the provided ArrayBuffer, 8-bit typed array or Buffer.

    Keywords

    none

    Install

    npm i to-data-view

    DownloadsWeekly Downloads

    47,938

    Version

    2.0.0

    License

    MIT

    Unpacked Size

    3.7 kB

    Total Files

    6

    Last publish

    Collaborators

    • linusu