MCPcopy
hub / github.com/sveltejs/svelte / remove_bom

Function remove_bom

packages/svelte/src/compiler/index.js:183–188  ·  view source on GitHub ↗

* Remove the byte order mark from a string if it's present since it would mess with our template generation logic * @param {string} source

(source)

Source from the content-addressed store, hash-verified

181 * @param {string} source
182 */
183function remove_bom(source) {
184 if (source.charCodeAt(0) === 0xfeff) {
185 return source.slice(1);
186 }
187 return source;
188}
189
190/**
191 * @deprecated Replace this with `import { walk } from 'estree-walker'`

Callers 4

compileFunction · 0.85
compileModuleFunction · 0.85
parseFunction · 0.85
parseCssFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected