Update readme.md

This commit is contained in:
Sindre Sorhus 2022-02-25 16:08:14 +07:00 committed by GitHub
parent 9f59fee0d9
commit 4248929445
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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']
``` ```