()
| 141 | this.set(bytes, true === littleEndian); |
| 142 | } |
| 143 | toString() { |
| 144 | // implementation assumes bytes are in little endian order |
| 145 | const byteLength = this.byteLength; |
| 146 | if (6 === byteLength) |
| 147 | return toHexString(this, ':'); |
| 148 | if (16 === byteLength) { |
| 149 | const bytes = new Uint8Array(this); |
| 150 | const string = |
| 151 | toHexString(bytes.slice(12, 16)) + '-' + |
| 152 | toHexString(bytes.slice(10, 12)) + '-' + |
| 153 | toHexString(bytes.slice(8, 10)) + '-' + |
| 154 | toHexString(bytes.slice(6, 8)) + '-' + |
| 155 | toHexString(bytes.slice(0, 6)); |
| 156 | return string; |
| 157 | } |
| 158 | |
| 159 | return toHexString(this); |
| 160 | } |
| 161 | set(bytes, littleEndian) @ "xs_bytes_set" |
| 162 | equals(bytes) @ "xs_bytes_equals" |
| 163 |
no test coverage detected