MCPcopy Create free account
hub / github.com/angular/dev-infra / decode

Function decode

github-actions/browserstack/set-browserstack-env.js:15414–15424  ·  view source on GitHub ↗
(ioQueue, encoding)

Source from the content-addressed store, hash-verified

15412 switch (type) {
15413 case "DataURL": {
15414 let dataURL = "data:";
15415 const parsed = parseMIMEType(mimeType || "application/octet-stream");
15416 if (parsed !== "failure") {
15417 dataURL += serializeAMimeType(parsed);
15418 }
15419 dataURL += ";base64,";
15420 const decoder = new StringDecoder2("latin1");
15421 for (const chunk of bytes) {
15422 dataURL += btoa(decoder.write(chunk));
15423 }
15424 dataURL += btoa(decoder.end());
15425 return dataURL;
15426 }
15427 case "Text": {

Callers 1

packageDataFunction · 0.70

Calls 3

combineByteSequencesFunction · 0.70
BOMSniffingFunction · 0.70
sliceMethod · 0.45

Tested by

no test coverage detected