Update readme.md
This commit is contained in:
parent
9f59fee0d9
commit
4248929445
1 changed files with 3 additions and 3 deletions
|
|
@ -247,12 +247,12 @@ Returns `true` if the value is a `string` and the `.length` is more than 0.
|
||||||
|
|
||||||
##### .nonEmptyStringAndNotWhitespace(value)
|
##### .nonEmptyStringAndNotWhitespace(value)
|
||||||
|
|
||||||
Returns `true` if `is.string(value)` and if it's a `string` that is non-empty and not a whitespace.
|
Returns `true` if the value is a `string` that is not empty and not whitespace.
|
||||||
|
|
||||||
```js
|
```js
|
||||||
const values = ['property1', '', null, 'property2', ' ', undefined]
|
const values = ['property1', '', null, 'property2', ' ', undefined];
|
||||||
|
|
||||||
values.filter(is.nonEmptyStringAndNotWhitespace)
|
values.filter(is.nonEmptyStringAndNotWhitespace);
|
||||||
//=> ['property1', 'property2']
|
//=> ['property1', 'property2']
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue