Function readUintBE
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
const readUintBE = (buffer, byteLength) => {
if (byteLength > 6) {
throw(new RangeError(`Cannot read more than 48 bits`));
};
if (byteLength > buffer.length) {
Function buildVLV
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
const buildVLV = (number) => {
if (!Number.isInteger(number)) {
throw(new TypeError(`Must be an integer`));
};5
if (number >= 268435456) {
Function buildUintBE
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
const buildUintBE = (number, byteLength) => {
if (byteLength > 6) {
throw(new RangeError(`Cannot write more than 48 bits`));
};
if (byteLength > buffer.length) {
Function readVLV
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
const readVLV = (buffer) => {
let result = 0, ptr = 0, resume = true;
while (ptr < 4 && resume) {
if (ptr) {
There are no issues that match your filters.