Methods
(static) endsWithNewLine(string) → {boolean}
- Source:
- Since:
- 0.5.0
Return true if the string ends with a newline
Example
> endsWithNewLine('abc')
false
> endsWithNewLine('abc\n')
true
> endsWithNewLine('abc\r\n')
true
Parameters:
Name | Type | Description |
---|---|---|
string |
string | The input string |
Returns:
- Type
- boolean
(static) isTrimmedNotEmpty(string) → {boolean}
- Source:
- Since:
- 0.1.0
Return true if the trimmed string is not empty
Example
> isTrimmedNotEmpty(' foo ')
true
> isTrimmedNotEmpty(' ')
false
Parameters:
Name | Type | Description |
---|---|---|
string |
string | The input string |
Returns:
- Type
- boolean