MCPcopy Create free account
hub / github.com/nodejs/node / isValidEncodedURL

Function isValidEncodedURL

deps/undici/undici.js:5284–5293  ·  view source on GitHub ↗
(url)

Source from the content-addressed store, hash-verified

5282 }
5283 __name(responseLocationURL, "responseLocationURL");
5284 function isValidEncodedURL(url) {
5285 for (let i = 0; i < url.length; ++i) {
5286 const code = url.charCodeAt(i);
5287 if (code > 126 || // Non-US-ASCII + DEL
5288 code < 32) {
5289 return false;
5290 }
5291 }
5292 return true;
5293 }
5294 __name(isValidEncodedURL, "isValidEncodedURL");
5295 function normalizeBinaryStringToUtf8(value) {
5296 return Buffer.from(value, "binary").toString("utf8");

Callers 1

responseLocationURLFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected