(data: BytesLike)
| 99 | * Returns a [[DataHexString]] representation of %%data%%. |
| 100 | */ |
| 101 | export function hexlify(data: BytesLike): string { |
| 102 | const bytes = getBytes(data); |
| 103 | |
| 104 | let result = "0x"; |
| 105 | for (let i = 0; i < bytes.length; i++) { |
| 106 | const v = bytes[i]; |
| 107 | result += HexCharacters[(v & 0xf0) >> 4] + HexCharacters[v & 0x0f]; |
| 108 | } |
| 109 | return result; |
| 110 | } |
| 111 | |
| 112 | /** |
| 113 | * Returns a [[DataHexString]] by concatenating all values |
no test coverage detected