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

Function isBlobLike

github-actions/browserstack/set-browserstack-env.js:1206–1217  ·  view source on GitHub ↗
(object)

Source from the content-addressed store, hash-verified

1204 return obj && typeof obj === "object" && typeof obj.pipe === "function" && typeof obj.on === "function";
1205 }
1206 function isBlobLike(object) {
1207 if (object === null) {
1208 return false;
1209 } else if (object instanceof Blob2) {
1210 return true;
1211 } else if (typeof object !== "object") {
1212 return false;
1213 } else {
1214 const sTag = object[Symbol.toStringTag];
1215 return (sTag === "Blob" || sTag === "File") && ("stream" in object && typeof object.stream === "function" || "arrayBuffer" in object && typeof object.arrayBuffer === "function");
1216 }
1217 }
1218 function buildURL(url, queryParams) {
1219 if (url.includes("?") || url.includes("#")) {
1220 throw new Error('Query params cannot be passed when url already contains "?" or "#".');

Callers 8

bodyLengthFunction · 0.70
constructorMethod · 0.70
appendMethod · 0.70
setMethod · 0.70
extractBodyFunction · 0.70
""Function · 0.70
schemeFetchFunction · 0.70
sendMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected