MCPcopy Index your code
hub / github.com/hoothin/UserScripts / isUtf8Charset

Function isUtf8Charset

Pagetual/pagetual.user.js:4251–4254  ·  view source on GitHub ↗
(label)

Source from the content-addressed store, hash-verified

4249 return charsetMatch && charsetMatch[1] ? charsetMatch[1].trim() : "";
4250 }
4251 function isUtf8Charset(label) {
4252 let normalized = String(label || "").trim().toLowerCase().replace(/_/g, "-");
4253 return !normalized || normalized === "utf-8" || normalized === "utf8";
4254 }
4255 if (!f || !f.url || typeof fetch === "undefined") {
4256 if (onFetchError) {
4257 onFetchError({error: "Fetch not available"});

Callers 1

requestWithFetchFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected