( view: $ArrayBufferView, )
| 10 | // Turns a TypedArray or ArrayBuffer into a string that can be used for comparison |
| 11 | // in a Map to see if the bytes are the same. |
| 12 | export default function binaryToComparableString( |
| 13 | view: $ArrayBufferView, |
| 14 | ): string { |
| 15 | return String.fromCharCode.apply( |
| 16 | String, |
| 17 | new Uint8Array(view.buffer, view.byteOffset, view.byteLength), |
| 18 | ); |
| 19 | } |
no test coverage detected