• Version 1.4.4
  • Published
  • 7.56 kB
  • No dependencies
  • MIT license


npm i @types/url-parse
yarn add @types/url-parse
pnpm add @types/url-parse


TypeScript definitions for url-parse



variable URLParse

const URLParse: {
(address: string, parser?: boolean | URLParse.QueryParser): URLParse;
address: string,
location?: string | object,
parser?: boolean | URLParse.QueryParser
): URLParse;
new (address: string, parser?: boolean | URLParse.QueryParser): URLParse;
new (
address: string,
location?: string | object,
parser?: boolean | URLParse.QueryParser
): URLParse;
url: string
): { slashes: boolean; protocol: string; rest: string };
location(url: string): object;
qs: { parse: URLParse.QueryParser; stringify: URLParse.StringifyQuery };


    interface URLParse

    interface URLParse {}

      property auth

      readonly auth: string;

        property hash

        readonly hash: string;

          property host

          readonly host: string;

            property hostname

            readonly hostname: string;

              property href

              readonly href: string;

                property origin

                readonly origin: string;

                  property password

                  readonly password: string;

                    property pathname

                    readonly pathname: string;

                      property port

                      readonly port: string;

                        property protocol

                        readonly protocol: string;

                          property query

                          readonly query: { [key: string]: string | undefined };

                            property slashes

                            readonly slashes: boolean;

                              property username

                              readonly username: string;

                                method set

                                set: (
                                part: URLParse.URLPart,
                                value: URLParse[URLParse.URLPart] | undefined,
                                fn?: boolean | URLParse.QueryParser
                                ) => URLParse;

                                  method toString

                                  toString: (stringify?: URLParse.StringifyQuery) => string;

                                    Type Aliases

                                    type QueryParser

                                    type QueryParser = (query: string) => object;

                                      type StringifyQuery

                                      type StringifyQuery = (query: object) => string;

                                        type URLPart

                                        type URLPart =
                                        | 'auth'
                                        | 'hash'
                                        | 'host'
                                        | 'hostname'
                                        | 'href'
                                        | 'origin'
                                        | 'password'
                                        | 'pathname'
                                        | 'port'
                                        | 'protocol'
                                        | 'query'
                                        | 'slashes'
                                        | 'username';

                                          Package Files (1)

                                          Dependencies (0)

                                          No dependencies.

                                          Dev Dependencies (0)

                                          No dev dependencies.

                                          Peer Dependencies (0)

                                          No peer dependencies.


                                          To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                                          You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@types/url-parse.

                                          • Markdown
                                          • HTML
                                            <a href="https://www.jsdocs.io/package/@types/url-parse"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>