@types/valid-url
Advanced tools
Comparing version 1.0.4 to 1.0.5
@@ -15,30 +15,29 @@ // Type definitions for valid-url v1.0.9 | ||
/** | ||
* Is the value a well-formed HTTP uri? | ||
* Specialized version of isUri() that only likes http:// urls. As a result, it can also do a much more thorough job validating. Also, unlike isUri() it is more concerned with only allowing real-world URIs through. Things like relative hostnames are allowed by the standards, but probably aren't wise. Conversely, null paths aren't allowed per RFC 2616 (should be '/' instead), but are allowed by this function. | ||
* | ||
* This function only works for fully-qualified URIs. /bob.html won't work. See RFC 3986 for the appropriate method to turn a relative URI into an absolute one given its context. | ||
* | ||
* Note that you probably want to either call this in combo with is_https_uri(). | ||
* i.e. if(isHttpUri(uri) || isHttpsUri(uri)) console.log('Good'); | ||
* or use the convenience method isWebUri which is equivalent. | ||
* @param value - The potential URI to test. | ||
* @returns The untainted RFC 3986 URI on success, undefined on failure. | ||
*/ | ||
* Is the value a well-formed HTTP uri? | ||
* Specialized version of isUri() that only likes http:// urls. As a result, it can also do a much more thorough job validating. Also, unlike isUri() it is more concerned with only allowing real-world URIs through. Things like relative hostnames are allowed by the standards, but probably aren't wise. Conversely, null paths aren't allowed per RFC 2616 (should be '/' instead), but are allowed by this function. | ||
* | ||
* This function only works for fully-qualified URIs. /bob.html won't work. See RFC 3986 for the appropriate method to turn a relative URI into an absolute one given its context. | ||
* | ||
* Note that you probably want to either call this in combo with is_https_uri(). | ||
* i.e. if(isHttpUri(uri) || isHttpsUri(uri)) console.log('Good'); | ||
* or use the convenience method isWebUri which is equivalent. | ||
* @param value - The potential URI to test. | ||
* @returns The untainted RFC 3986 URI on success, undefined on failure. | ||
*/ | ||
export function isHttpUri(value: string): string | undefined; | ||
/** | ||
* Is the value a well-formed HTTPS uri? | ||
*See is_http_uri() for details. This version only likes the https URI scheme. Otherwise it's identical to is_http_uri(). | ||
* @param value - The potential URI to test. | ||
* @returns The untainted RFC 3986 URI on success, undefined on failure. | ||
*/ | ||
* Is the value a well-formed HTTPS uri? | ||
* See is_http_uri() for details. This version only likes the https URI scheme. Otherwise it's identical to is_http_uri(). | ||
* @param value - The potential URI to test. | ||
* @returns The untainted RFC 3986 URI on success, undefined on failure. | ||
*/ | ||
export function isHttpsUri(value: string): string | undefined; | ||
/** | ||
* Is the value a well-formed HTTP or HTTPS uri? | ||
* This is just a convenience method that combines isHttpUri and isHttpsUri to accept most common real-world URLs. | ||
* @param value - The potential URI to test. | ||
* @returns The untainted RFC 3986 URI on success, undefined on failure. | ||
*/ | ||
* Is the value a well-formed HTTP or HTTPS uri? | ||
* This is just a convenience method that combines isHttpUri and isHttpsUri to accept most common real-world URLs. | ||
* @param value - The potential URI to test. | ||
* @returns The untainted RFC 3986 URI on success, undefined on failure. | ||
*/ | ||
export function isWebUri(value: string): string | undefined; |
{ | ||
"name": "@types/valid-url", | ||
"version": "1.0.4", | ||
"version": "1.0.5", | ||
"description": "TypeScript definitions for valid-url", | ||
@@ -23,4 +23,4 @@ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/valid-url", | ||
"dependencies": {}, | ||
"typesPublisherContentHash": "35e8c46d1db2f9c30082b956dc31105abac63ff591f491d446574a60840f9d33", | ||
"typeScriptVersion": "4.2" | ||
"typesPublisherContentHash": "7f27ef2edac77228dc939df733b2310e4e2a34a771e1a012964b2190a5cc40e6", | ||
"typeScriptVersion": "4.5" | ||
} |
@@ -25,30 +25,29 @@ # Installation | ||
/** | ||
* Is the value a well-formed HTTP uri? | ||
* Specialized version of isUri() that only likes http:// urls. As a result, it can also do a much more thorough job validating. Also, unlike isUri() it is more concerned with only allowing real-world URIs through. Things like relative hostnames are allowed by the standards, but probably aren't wise. Conversely, null paths aren't allowed per RFC 2616 (should be '/' instead), but are allowed by this function. | ||
* | ||
* This function only works for fully-qualified URIs. /bob.html won't work. See RFC 3986 for the appropriate method to turn a relative URI into an absolute one given its context. | ||
* | ||
* Note that you probably want to either call this in combo with is_https_uri(). | ||
* i.e. if(isHttpUri(uri) || isHttpsUri(uri)) console.log('Good'); | ||
* or use the convenience method isWebUri which is equivalent. | ||
* @param value - The potential URI to test. | ||
* @returns The untainted RFC 3986 URI on success, undefined on failure. | ||
*/ | ||
* Is the value a well-formed HTTP uri? | ||
* Specialized version of isUri() that only likes http:// urls. As a result, it can also do a much more thorough job validating. Also, unlike isUri() it is more concerned with only allowing real-world URIs through. Things like relative hostnames are allowed by the standards, but probably aren't wise. Conversely, null paths aren't allowed per RFC 2616 (should be '/' instead), but are allowed by this function. | ||
* | ||
* This function only works for fully-qualified URIs. /bob.html won't work. See RFC 3986 for the appropriate method to turn a relative URI into an absolute one given its context. | ||
* | ||
* Note that you probably want to either call this in combo with is_https_uri(). | ||
* i.e. if(isHttpUri(uri) || isHttpsUri(uri)) console.log('Good'); | ||
* or use the convenience method isWebUri which is equivalent. | ||
* @param value - The potential URI to test. | ||
* @returns The untainted RFC 3986 URI on success, undefined on failure. | ||
*/ | ||
export function isHttpUri(value: string): string | undefined; | ||
/** | ||
* Is the value a well-formed HTTPS uri? | ||
*See is_http_uri() for details. This version only likes the https URI scheme. Otherwise it's identical to is_http_uri(). | ||
* @param value - The potential URI to test. | ||
* @returns The untainted RFC 3986 URI on success, undefined on failure. | ||
*/ | ||
* Is the value a well-formed HTTPS uri? | ||
* See is_http_uri() for details. This version only likes the https URI scheme. Otherwise it's identical to is_http_uri(). | ||
* @param value - The potential URI to test. | ||
* @returns The untainted RFC 3986 URI on success, undefined on failure. | ||
*/ | ||
export function isHttpsUri(value: string): string | undefined; | ||
/** | ||
* Is the value a well-formed HTTP or HTTPS uri? | ||
* This is just a convenience method that combines isHttpUri and isHttpsUri to accept most common real-world URLs. | ||
* @param value - The potential URI to test. | ||
* @returns The untainted RFC 3986 URI on success, undefined on failure. | ||
*/ | ||
* Is the value a well-formed HTTP or HTTPS uri? | ||
* This is just a convenience method that combines isHttpUri and isHttpsUri to accept most common real-world URLs. | ||
* @param value - The potential URI to test. | ||
* @returns The untainted RFC 3986 URI on success, undefined on failure. | ||
*/ | ||
export function isWebUri(value: string): string | undefined; | ||
@@ -59,3 +58,3 @@ | ||
### Additional Details | ||
* Last updated: Wed, 15 Feb 2023 19:32:46 GMT | ||
* Last updated: Tue, 26 Sep 2023 10:06:28 GMT | ||
* Dependencies: none | ||
@@ -62,0 +61,0 @@ * Global values: none |
7451
63