(key)
| 1 | const binLookup = (key) => |
| 2 | ({ |
| 3 | 0: '0000', |
| 4 | 1: '0001', |
| 5 | 2: '0010', |
| 6 | 3: '0011', |
| 7 | 4: '0100', |
| 8 | 5: '0101', |
| 9 | 6: '0110', |
| 10 | 7: '0111', |
| 11 | 8: '1000', |
| 12 | 9: '1001', |
| 13 | a: '1010', |
| 14 | b: '1011', |
| 15 | c: '1100', |
| 16 | d: '1101', |
| 17 | e: '1110', |
| 18 | f: '1111' |
| 19 | })[key.toLowerCase()] // select the binary number by valid hex key with the help javascript object |
| 20 | |
| 21 | const hexToBinary = (hexString) => { |
| 22 | if (typeof hexString !== 'string') { |