forked from orbit-oss/is
Add is.urlInstance (#60)
This commit is contained in:
parent
c8736c2972
commit
3bdaf21475
3 changed files with 23 additions and 1 deletions
11
readme.md
11
readme.md
|
|
@ -176,6 +176,17 @@ is.directInstanceOf(new UnicornError(), Error);
|
|||
//=> false
|
||||
```
|
||||
|
||||
##### .urlInstance(value)
|
||||
|
||||
Returns `true` if `value` is an instance of the [`URL` class](https://developer.mozilla.org/en-US/docs/Web/API/URL).
|
||||
|
||||
```js
|
||||
const url = new URL('https://example.com');
|
||||
|
||||
is.urlInstance(url);
|
||||
//=> true
|
||||
```
|
||||
|
||||
##### .truthy(value)
|
||||
|
||||
Returns `true` for all values that evaluate to true in a boolean context:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue