Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/molt/lib/std/fs.ts>formatEOL

Update dependencies the Deno way
Latest
function formatEOL
import { formatEOL } from "https://deno.land/x/molt@0.17.2/lib/std/fs.ts";

Format the file to the targeted EOL.

Examples

Example 1

import { LF, format } from "https://deno.land/std@0.224.0/fs/mod.ts";

const CRLFinput = "deno\r\nis not\r\nnode";

format(CRLFinput, LF); // output "deno\nis not\nnode"

Parameters

content: string
eol: EOL

Returns

string