Comparing version 0.6.0 to 0.6.1
@@ -5,2 +5,4 @@ # Changelog | ||
### [0.6.1](https://github.com/nuxt-contrib/ufo/compare/v0.6.0...v0.6.1) (2021-02-02) | ||
## [0.6.0](https://github.com/nuxt-contrib/ufo/compare/v0.5.4...v0.6.0) (2021-02-02) | ||
@@ -7,0 +9,0 @@ |
@@ -55,2 +55,9 @@ /** | ||
declare function decode(text?: string | number): string; | ||
/** | ||
* Decode query value (consitant with encodeQueryValue for plus encoding). | ||
* | ||
* @param text - string to decode | ||
* @returns decoded string | ||
*/ | ||
declare function decodeQueryValue(text: string): string; | ||
declare function encodeHost(name?: string): string; | ||
@@ -124,2 +131,2 @@ | ||
export { $URL, ParsedAuth, ParsedHost, ParsedURL, QueryObject, QueryValue, cleanDoubleSlashes, createURL, decode, encode, encodeHash, encodeHost, encodeParam, encodePath, encodeQueryItem, encodeQueryKey, encodeQueryValue, getQuery, hasProtocol, joinURL, normalizeURL, parseAuth, parseHost, parsePath, parseQuery, parseURL, resolveURL, stringifyParsedURL, stringifyQuery, withLeadingSlash, withQuery, withTrailingSlash, withoutLeadingSlash, withoutTrailingSlash }; | ||
export { $URL, ParsedAuth, ParsedHost, ParsedURL, QueryObject, QueryValue, cleanDoubleSlashes, createURL, decode, decodeQueryValue, encode, encodeHash, encodeHost, encodeParam, encodePath, encodeQueryItem, encodeQueryKey, encodeQueryValue, getQuery, hasProtocol, joinURL, normalizeURL, parseAuth, parseHost, parsePath, parseQuery, parseURL, resolveURL, stringifyParsedURL, stringifyQuery, withLeadingSlash, withQuery, withTrailingSlash, withoutLeadingSlash, withoutTrailingSlash }; |
@@ -131,2 +131,5 @@ 'use strict'; | ||
} | ||
function decodeQueryValue(text) { | ||
return decode(text.replace(PLUS_RE, " ")); | ||
} | ||
function encodeHost(name = "") { | ||
@@ -147,3 +150,3 @@ return toASCII(name); | ||
const key = decode(s[1]); | ||
const value = decode(s[2] || ""); | ||
const value = decodeQueryValue(s[2] || ""); | ||
if (obj[key]) { | ||
@@ -358,2 +361,3 @@ if (Array.isArray(obj[key])) { | ||
exports.decode = decode; | ||
exports.decodeQueryValue = decodeQueryValue; | ||
exports.encode = encode; | ||
@@ -360,0 +364,0 @@ exports.encodeHash = encodeHash; |
{ | ||
"name": "ufo", | ||
"version": "0.6.0", | ||
"version": "0.6.1", | ||
"description": "URL utils for humans", | ||
@@ -5,0 +5,0 @@ "repository": "nuxt-contrib/ufo", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
37847
848