* Check if all chunks in an array are already Uint8Array (no strings). * Short-circuits on the first string found. * @param {Array } chunks * @returns {boolean}
(chunks)
| 113 | * @returns {boolean} |
| 114 | */ |
| 115 | function allUint8Array(chunks) { |
| 116 | // Ok, well, kind of. This is more a check for "no strings"... |
| 117 | for (let i = 0; i < chunks.length; i++) { |
| 118 | if (typeof chunks[i] === 'string') return false; |
| 119 | } |
| 120 | return true; |
| 121 | } |
| 122 | |
| 123 | /** |
| 124 | * Concatenate multiple Uint8Arrays into a single Uint8Array. |
no outgoing calls
no test coverage detected
searching dependent graphs…