@types/url-parse

  • Version 1.4.3
  • Published
  • 5.11 kB
  • No dependencies
  • MIT license

Install

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

Overview

TypeScript definitions for url-parse

Index

Variables

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;
extractProtocol(
url: string
): { slashes: boolean; protocol: string; rest: string };
location(url: string): object;
qs: { parse: URLParse.QueryParser; stringify: URLParse.StringifyQuery };
};

    Interfaces

    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: string | object | number | 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.

                                          Badge

                                          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
                                            [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@types/url-parse)
                                          • 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>