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(str: string): string

Parameters:

ParameterTypeDescription
strstringThe string.

Returns: string — The string with LF line endings.