* Returns binary string representing given bytes. * @param {Uint8Array} bytes Bytes * @return {string} Binary string
(bytes)
| 62 | * @return {string} Binary string |
| 63 | */ |
| 64 | static binaryStringFromBytes (bytes) { |
| 65 | return Array.from(bytes) |
| 66 | .map(byte => ('0000000' + byte.toString(2)).slice(-8)) |
| 67 | .join('') |
| 68 | } |
| 69 | |
| 70 | /** |
| 71 | * Returns bytes from given binary string. |
no test coverage detected