We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7710b74 commit 10b6693Copy full SHA for 10b6693
2 files changed
package.json
@@ -3,6 +3,7 @@
3
"version": "2.2.1",
4
"description": "Splits an url into sub-domain, domain and effective top-level-domain",
5
"main": "./lib/parseDomain.js",
6
+ "types": "./lib/index.d.ts",
7
"scripts": {
8
"build": "run-s build:lib build:tries",
9
"build:lib": "run-s build:lib:clean build:lib:babel",
src/index.d.ts
@@ -0,0 +1,18 @@
1
+export as namespace parseDomain;
2
+
+declare namespace parseDomain {
+ interface IParseOptions {
+ customTlds?: RegExp | string[];
+ privateTlds?: boolean;
+ }
+ interface IParsedDomain {
10
+ domain?: string;
11
+ subdomain?: string;
12
+ tld?: string;
13
14
+}
15
16
+declare function parseDomain (url: string, options?: parseDomain.IParseOptions): parseDomain.IParsedDomain;
17
18
+export = parseDomain;
0 commit comments