(parts, options)
| 51881 | if (value !== "native") { |
| 51882 | value = "transparent"; |
| 51883 | } |
| 51884 | return value; |
| 51885 | }, |
| 51886 | defaultValue: "transparent" |
| 51887 | } |
| 51888 | ]); |
| 51889 | function processBlobParts(parts, options) { |
| 51890 | const bytes = []; |
| 51891 | for (const element of parts) { |
| 51892 | if (typeof element === "string") { |
| 51893 | let s2 = element; |
| 51894 | if (options.endings === "native") { |
| 51895 | s2 = convertLineEndingsNative(s2); |
| 51896 | } |
| 51897 | bytes.push(encoder.encode(s2)); |
| 51898 | } else if (types.isAnyArrayBuffer(element) || types.isTypedArray(element)) { |
| 51899 | if (!element.buffer) { |
| 51900 | bytes.push(new Uint8Array(element)); |
| 51901 | } else { |
| 51902 | bytes.push( |
| 51903 | new Uint8Array(element.buffer, element.byteOffset, element.byteLength) |
| 51904 | ); |
| 51905 | } |
| 51906 | } else if (isBlobLike3(element)) { |
| 51907 | bytes.push(element); |
| 51908 | } |
no test coverage detected
searching dependent graphs…