From 89475f5a82f03bf348c5ec025585b011115f7a00 Mon Sep 17 00:00:00 2001 From: arturovt Date: Mon, 9 Jul 2018 11:37:45 +0300 Subject: [PATCH] Update readme --- readme.md | 11 +++++++++++ source/index.ts | 4 ++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/readme.md b/readme.md index 66f83b1..8e3440c 100644 --- a/readme.md +++ b/readme.md @@ -176,6 +176,17 @@ is.directInstanceOf(new UnicornError(), Error); //=> false ``` +##### .urlInstance(value) + +Returns `true` if `value` is an instance of `URL` class. + +```js +const url = new URL('https://google.com'); + +is.urlInstance(url); +//=> true +``` + ##### .truthy(value) Returns `true` for all values that evaluate to true in a boolean context: diff --git a/source/index.ts b/source/index.ts index 8ee3dd5..c6aeea2 100644 --- a/source/index.ts +++ b/source/index.ts @@ -48,8 +48,8 @@ export const enum TypeName { ArrayBuffer = 'ArrayBuffer', SharedArrayBuffer = 'SharedArrayBuffer', DataView = 'DataView', - Promise = 'Promise', - URL = 'URL' + Promise = 'Promise', + URL = 'URL' } const toString = Object.prototype.toString;