New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@types/domurl

Package Overview
Dependencies
Maintainers
0
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/domurl - npm Package Compare versions

Comparing version 0.0.9 to 2.3.0

84

domurl/index.d.ts

@@ -6,19 +6,93 @@ declare namespace domurl {

declare class Url<T> {
constructor(url?: string);
/**
* Constructor. If url argument is not passed, current document URL will be used. If second
* argument bypassed as true value it will try to do no transforms on a given source URL to
* keep it form as it was initially given. Otherwise, by default, it will try to resolve given
* URL to an absolute form.
*/
constructor(url?: string, noTransform?: boolean);
/**
* QueryString object. It's a simple Javascript object with automatic string mapping. String
* representation contains everything after "?" and to the end of QueryString.
*/
query: domurl.QueryString<T>;
/**
* protocol part of URL, everything between the beginning of the URL string and "://"
* delimiter (if specified)
*/
protocol: string;
/**
* auth user name (if specified)
*/
user: string;
/**
* auth user password (if specified)
*/
pass: string;
/**
* host name (if specified)
*/
host: string;
/**
* port number (if specified)
*/
port: string;
/**
* document path
*/
path: string;
/**
* Anchor part of the URL. Everything after "#" and to the end of anchor.
*/
hash: string;
href: string;
/**
* Converts URL to string representation. As far as it's special method, any time string
* operations is performed over Url objects this method is automatically called
*/
toString: () => string;
encode: (s: string) => string;
decode: (s: string) => string;
/**
* Performs URI-compatible encoding of the given urlPart component.
*/
encode: (urlPart: string) => string;
/**
* Performs decoding of URI-encoded component.
*/
decode: (encUrlPart: string) => string;
/**
* Checks if current URL is an absolute resource locator (globally absolute
* or absolute path to current server)
*/
isAbsolute: () => boolean;
paths: (paths?: [string]) => [string];
/**
* Returns Url.path representation as array or sets it via array representation if optional
* array of pathStrings was provided.
*/
paths: (pathStrings?: string[]) => string[];
/**
* Returns true if query string contains no parameters, false otherwise.
*/
isEmptyQuery: () => boolean;
/**
* Returns total count of the query string parameters.
*/
queryLength: () => number;
/**
* Removes all query string parameters from the URL.
*/
clearQuery: () => Url<{}>;

@@ -25,0 +99,0 @@ }

6

domurl/package.json
{
"name": "@types/domurl",
"version": "0.0.9",
"version": "2.3.0",
"description": "TypeScript definitions for domurl",

@@ -22,4 +22,4 @@ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/domurl",

"dependencies": {},
"typesPublisherContentHash": "51013a4962fa9be4c2bca7dce1608b6612939da9792c3dce937c5589af5a6d05",
"typeScriptVersion": "4.5"
"typesPublisherContentHash": "b3324346789fe18b997140a48cbf0caf51ef4423a1f255dadb0c4cf6fe903b73",
"typeScriptVersion": "4.8"
}

@@ -9,35 +9,5 @@ # Installation

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/domurl.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/domurl/index.d.ts)
````ts
declare namespace domurl {
type QueryString<T> = T;
}
declare class Url<T> {
constructor(url?: string);
query: domurl.QueryString<T>;
protocol: string;
user: string;
pass: string;
host: string;
port: string;
path: string;
hash: string;
href: string;
toString: () => string;
encode: (s: string) => string;
decode: (s: string) => string;
isAbsolute: () => boolean;
paths: (paths?: [string]) => [string];
isEmptyQuery: () => boolean;
queryLength: () => number;
clearQuery: () => Url<{}>;
}
export = Url;
````
### Additional Details
* Last updated: Mon, 06 Nov 2023 22:41:05 GMT
* Last updated: Wed, 25 Sep 2024 18:09:36 GMT
* Dependencies: none

@@ -44,0 +14,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc