vuoto
Version:
Modern whitespace normalizer CLI with enhanced output and developer experience - cut the noise, clean the void
17 lines (16 loc) • 376 B
JavaScript
import { FORM_FEED } from '../consts.js';
/**
* Replaces form feed (U+000C) with a newline.
* @param input The string to normalize.
*
* @returns The normalized string.
*
* @example
*
* ```ts
* const normalized = normalizeFormFeed('Hello\fWorld'); // 'Hello\nWorld'
* ```
*/
export function normalizeFormFeed(input) {
return input.replaceAll(FORM_FEED, '\n');
}