@types/url-parse
- Version 1.4.11
- Published
- 5.74 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?: false): URLParse<string>; (address: string, parser: true): URLParse<Record<string, string | undefined>>; <T>(address: string, parser: URLParse.QueryParser<T>): URLParse<T>; (address: string, location?: string | object, parser?: false): URLParse<string>; (address: string, location: string | object | undefined, parser: true): URLParse< Record<string, string | undefined> >; <T>( address: string, location: string | object | undefined, parser: URLParse.QueryParser<T> ): URLParse<T>; new (address: string, parser?: false): URLParse<string>; new (address: string, parser: true): URLParse< Record<string, string | undefined> >; new <T>(address: string, parser?: URLParse.QueryParser<T>): URLParse<T>; new ( address: string, location?: string | object, parser?: false ): URLParse<string>; new ( address: string, location: string | object | undefined, parser: true ): URLParse<Record<string, string | undefined>>; new <T>( address: string, location: string | object | undefined, parser: URLParse.QueryParser<T> ): URLParse<T>; extractProtocol(url: string): { slashes: boolean; protocol: string; rest: string; }; location(url: string): object; qs: { parse: URLParse.QueryParser; stringify: URLParse.StringifyQuery }; trimLeft(url: string): string;};
Interfaces
interface URLParse
interface URLParse<Query> {}
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: Query;
property slashes
readonly slashes: boolean;
property username
readonly username: string;
method set
set: { <Part extends URLParse.URLPart>( part: Part, value: URLParse<Query>[Part] | undefined, fn?: false ): URLParse<Query>; <Part extends URLParse.URLPart, T>( part: Part, value: URLParse<T>[Part], fn?: URLParse.QueryParser<T> ): URLParse<T>;};
method toString
toString: (stringify?: URLParse.StringifyQuery) => string;
Type Aliases
type QueryParser
type QueryParser<T = Record<string, string | undefined>> = (query: string) => T;
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 oneto 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>
- Updated .
Package analyzed in 3795 ms. - Missing or incorrect documentation? Open an issue for this package.