Add is.url

This commit is contained in:
Itai Steinherz 2018-12-07 07:19:18 +02:00
parent 9df6f4ebe9
commit 1ecd9367b2
No known key found for this signature in database
GPG key ID: BE977733D203B00A
3 changed files with 28 additions and 0 deletions

View file

@ -255,6 +255,12 @@ is.urlInstance(url);
//=> true
```
### .url(value)
Returns `true` if `value` is a URL.
Note: this only does basic checking using the [`URL` class](https://developer.mozilla.org/en-US/docs/Web/API/URL) constructor.
##### .truthy(value)
Returns `true` for all values that evaluate to true in a boolean context: