MCPcopy
hub / github.com/nuxt/nuxt / normalizeLineEndings

Function normalizeLineEndings

packages/nuxt/test/utils.ts:5–7  ·  view source on GitHub ↗
(str: string, normalized = '\n')

Source from the content-addressed store, hash-verified

3export const componentsFixtureDir = fileURLToPath(new URL('components-fixture', import.meta.url))
4
5export function normalizeLineEndings (str: string, normalized = '\n') {
6 return str.replace(/\r?\n/g, normalized)
7}
8
9export function clean (string?: string) {
10 const lines = string?.split('\n').filter(l => l.trim()) || []

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…