import { detect } from "https://deno.land/std@0.222.1/fs/mod.ts";
Returns the detected EOL character(s) detected in the input string. If no EOL
character is detected, null
is returned.
Examples
Example 1
Example 1
import { detect } from "https://deno.land/std@0.222.1/fs/eol.ts";
detect("deno\r\nis not\r\nnode"); // "\r\n"
detect("deno\nis not\r\nnode"); // "\r\n"
detect("deno\nis not\nnode"); // "\n"
detect("deno is not node"); // null