Skip to content

Commit

Permalink
Clarify return values in docs
Browse files Browse the repository at this point in the history
Fixes: #11
  • Loading branch information
silverwind committed Sep 21, 2023
1 parent 36e1f24 commit c7323a9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ detectNewline('foo\nbar\nbaz\r\n');

### detectNewline(string)

Returns the detected newline or `undefined` when no newline character is found.
Returns the detected newline or `undefined` when no newline character is found or `\n` when no dominant newline is present.

### detectNewlineGraceful(unknown)

Returns the detected newline or `\n` when no newline character is found or the input is not a string.
Returns the detected newline or `\n` when no newline character is found, no dominant newline is present, or the input is not a string.

## Related

Expand Down

0 comments on commit c7323a9

Please sign in to comment.