Returns the detected EOL character(s) detected in the input string. If no EOL character is detected, null is returned.
null
The input string to detect EOL characters.
The detected EOL character(s) or null if no EOL character is detected.
import { detect } from "@std/fs/eol";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 Copy
import { detect } from "@std/fs/eol";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
Returns the detected EOL character(s) detected in the input string. If no EOL character is detected,
nullis returned.