extract-domain
Advanced tools
Comparing version 4.1.3 to 4.1.4
type Url = string; | ||
type Urls = string | Array<string>; | ||
type ReturnUrls = Array<Url> | Array<Promise<Url>>; | ||
type ReturnUrl = Url | Promise<Url>; | ||
type ReturnUrl = Url | Promise<Url | null>; | ||
/** | ||
@@ -16,3 +16,3 @@ * Options to extract domain. | ||
*/ | ||
export default function extractDomain(urls: Urls, opts?: GetDomainOptions): ReturnUrls | ReturnUrl; | ||
export default function extractDomain(urls: Urls, opts?: GetDomainOptions): ReturnUrl | ReturnUrls | null; | ||
export {}; |
@@ -11,3 +11,3 @@ function throwTypeError(): never { | ||
type ReturnUrls = Array<Url> | Array<Promise<Url>>; | ||
type ReturnUrl = Url | Promise<Url>; | ||
type ReturnUrl = Url | Promise<Url | null>; | ||
@@ -110,3 +110,3 @@ /** | ||
opts: GetDomainOptions = {} | ||
): ReturnUrls | ReturnUrl { | ||
): ReturnUrl | ReturnUrls | null { | ||
if (typeof urls === 'string') { | ||
@@ -113,0 +113,0 @@ return getDomainFromUrl(urls, opts); |
{ | ||
"name": "extract-domain", | ||
"version": "4.1.3", | ||
"version": "4.1.4", | ||
"description": "Extract domain name from URL", | ||
@@ -43,2 +43,3 @@ "type": "module", | ||
"devDependencies": { | ||
"@types/psl": "^1.1.0", | ||
"microbundle": "^0.15.1", | ||
@@ -49,5 +50,5 @@ "mocha": "^10.2.0", | ||
}, | ||
"dependencies": { | ||
"peerDependencies": { | ||
"psl": "^1.9.0" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
34958
5
- Removedpsl@^1.9.0