UNPKG

416 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3exports.readUInt = void 0;
4// Abstract reading multi-byte unsigned integers
5function readUInt(buffer, bits, offset, isBigEndian) {
6 offset = offset || 0;
7 const endian = isBigEndian ? 'BE' : 'LE';
8 const methodName = ('readUInt' + bits + endian);
9 return buffer[methodName].call(buffer, offset);
10}
11exports.readUInt = readUInt;