Skip to content

ensureLfEndings

Ensures that a string has LF line endings.

It replaces CRLF line endings with LF.

Import:

import { ensureLfEndings } from 'obsidian-dev-utils/string';

Signature:

function ensureLfEndings($string: string): string

Parameters:

ParameterTypeDescription
$stringstring

Returns: string — The string with LF line endings.