MCPcopy
hub / github.com/sveltejs/kit / decode

Function decode

packages/kit/src/core/postbuild/entities.js:2248–2252  ·  view source on GitHub ↗
(str)

Source from the content-addressed store, hash-verified

2246
2247/** @param {string} str */
2248export function decode(str) {
2249 return str
2250 .replace(numeric, (_match, hex, code) => String.fromCharCode(hex ? parseInt(code, 16) : +code))
2251 .replace(named, (_match, entity) => entities[entity]);
2252}

Callers 2

entities.spec.jsFile · 0.90
crawlFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected