get-byte

0.0.0 • Public • Published

get-byte

A Universal way of getting a Byte at a Given Index from a variety of in-memory data formats, including Uint8Array, Buffer, DataView, and Array Buffer

install

npm install get-byte

usage

import getByte from 'get-byte';
 
// gets the 10th byte from a buffer
getByte(buffer, 10);
 
// gets the 10th byte from an array buffer
getByte(arrayBuffer, 10);
 
// gets the 10th byte from a data view
getByte(dataView, 10);
 
// gets the 10th byte from a Uint8Array
getByte(uint8Array, 10);

Package Sidebar

Install

npm i get-byte

Weekly Downloads

31

Version

0.0.0

License

CC0-1.0

Unpacked Size

9.4 kB

Total Files

5

Last publish

Collaborators

  • danieljdufour