diff --git a/source/index.ts b/source/index.ts index c6aeea2..868ec18 100644 --- a/source/index.ts +++ b/source/index.ts @@ -48,8 +48,7 @@ export const enum TypeName { ArrayBuffer = 'ArrayBuffer', SharedArrayBuffer = 'SharedArrayBuffer', DataView = 'DataView', - Promise = 'Promise', - URL = 'URL' + Promise = 'Promise' } const toString = Object.prototype.toString; @@ -178,7 +177,6 @@ namespace is { // tslint:disable-line:no-namespace export const dataView = isObjectOfType(TypeName.DataView); export const directInstanceOf = (instance: any, klass: Class): instance is T => Object.getPrototypeOf(instance) === klass.prototype; - export const urlInstance = (value: any): value is URL => isObjectOfType(TypeName.URL)(value); export const truthy = (value: any) => Boolean(value); export const falsy = (value: any) => !value; diff --git a/source/tests/test.ts b/source/tests/test.ts index 92897e0..a2d56ad 100644 --- a/source/tests/test.ts +++ b/source/tests/test.ts @@ -3,7 +3,6 @@ import net from 'net'; import Stream from 'stream'; import util from 'util'; import tempy from 'tempy'; -import {URL} from 'url'; import test, {TestContext, Context} from 'ava'; import {JSDOM} from 'jsdom'; import {Subject, Observable} from 'rxjs'; @@ -535,16 +534,6 @@ test('is.directInstanceOf', t => { t.false(m.directInstanceOf(errorSubclass, Error)); }); -test('is.urlInstance', t => { - const url = new URL('https://google.com'); - - t.true(m.urlInstance(url)); - - t.false(m.urlInstance({})); - t.false(m.urlInstance(undefined)); - t.false(m.urlInstance(null)); -}); - test('is.truthy', t => { t.true(m.truthy('unicorn')); t.true(m.truthy('🦄'));