← Back to index
function format

Format the file to the targeted EOL.

Examples

🔗

Example 1

import { EOL, format } from "https://deno.land/std@$STD_VERSION/fs/mod.ts";

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

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

Parameters

🔗
content: string
🔗
eol: EOL