* Returns a [[DataHexString]] representation of %%data%%.
(data)
| 81 | * Returns a [[DataHexString]] representation of %%data%%. |
| 82 | */ |
| 83 | function hexlify(data) { |
| 84 | const bytes = getBytes(data); |
| 85 | let result = "0x"; |
| 86 | for (let i = 0; i < bytes.length; i++) { |
| 87 | const v = bytes[i]; |
| 88 | result += HexCharacters[(v & 0xf0) >> 4] + HexCharacters[v & 0x0f]; |
| 89 | } |
| 90 | return result; |
| 91 | } |
| 92 | exports.hexlify = hexlify; |
| 93 | /** |
| 94 | * Returns a [[DataHexString]] by concatenating all values |
no test coverage detected