UNPKG

vuoto

Version:

Modern whitespace normalizer CLI with enhanced output and developer experience - cut the noise, clean the void

17 lines (16 loc) 441 B
import { PARAGRAPH_SEPARATOR } from '../consts.js'; /** * Replaces paragraph separator (U+2029) with a double newline. * @param input The string to normalize. * * @returns The normalized string. * * @example * * ```ts * const normalized = normalizeParagraphSeparator('Hello\u2029World'); // 'Hello\n\nWorld' * ``` */ export function normalizeParagraphSeparator(input) { return input.replaceAll(PARAGRAPH_SEPARATOR, '\n\n'); }