wip: big refactor

This commit is contained in:
Lewis Moten
2024-05-10 04:42:51 -04:00
parent 513aa67875
commit fdb6723e87
12 changed files with 1384 additions and 993 deletions

10
converters.js Normal file
View File

@@ -0,0 +1,10 @@
export const bitsToInt = (bits, bitLength) => {
parseInt(bits
// only grab the bits we need
.slice(0, bitLength)
// combine into string
.join('')
// Assume missing bits were zeros
.padEnd(bitLength, '0')
);
}