source: frontend/node_modules/detect-newline/index.d.ts

Last change on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 12 days ago

Fix frontend appearance

  • Property mode set to 100644
File size: 614 bytes
Line 
1declare const detectNewline: {
2 /**
3 Detect the dominant newline character of a string.
4
5 @returns The detected newline or `undefined` when no newline character is found.
6
7 @example
8 ```
9 import detectNewline = require('detect-newline');
10
11 detectNewline('foo\nbar\nbaz\r\n');
12 //=> '\n'
13 ```
14 */
15 (string: string): '\r\n' | '\n' | undefined;
16
17 /**
18 Detect the dominant newline character of a string.
19
20 @returns The detected newline or `\n` when no newline character is found or the input is not a string.
21 */
22 graceful(string: string): '\r\n' | '\n';
23 graceful(string?: unknown): '\n';
24};
25
26export = detectNewline;
Note: See TracBrowser for help on using the repository browser.