Skip to content

ensureLfEndings

Ensures that a string has LF line endings.

It replaces CRLF line endings with LF.

Import:

import { ensureLfEndings } from '@mnaoumov/typescript-lib/string';

Signature:

function ensureLfEndings($string: string): string

Parameters:

Parameter Type Description
$string string

Returns: string — The string with LF line endings.