MCPcopy
hub / github.com/zxing-js/library / toBitArray

Function toBitArray

src/test/core/aztec/encoder/EncoderTest.spec.ts:770–777  ·  view source on GitHub ↗
(bits: string)

Source from the content-addressed store, hash-verified

768 }
769
770 function toBitArray(bits: string): BitArray {
771 const inArr = new BitArray();
772 const str: string[] = bits.replace(DOTX, '').split('');
773 for (let aStr of str) {
774 inArr.appendBit(aStr === 'X');
775 }
776 return inArr;
777 }
778
779 function toBooleanArray(bitArray: BitArray) {
780 const result: boolean[] = new Array<boolean>(bitArray.getSize());

Callers 1

testStuffBitsFunction · 0.85

Calls 1

appendBitMethod · 0.95

Tested by

no test coverage detected