MCPcopy
hub / github.com/vitejs/vite / stripBomTag

Function stripBomTag

packages/vite/src/node/utils.ts:1607–1613  ·  view source on GitHub ↗
(content: string)

Source from the content-addressed store, hash-verified

1605
1606// strip UTF-8 BOM
1607export function stripBomTag(content: string): string {
1608 if (content.charCodeAt(0) === 0xfeff) {
1609 return content.slice(1)
1610 }
1611
1612 return content
1613}
1614
1615/**
1616 * Determine if a file is being requested with the correct case, to ensure

Callers 3

loadPackageDataFunction · 0.90
transformFunction · 0.90
handlerFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected