@bitcointrade/query-string-hoc
Advanced tools
Comparing version 1.0.0-alpha.2 to 1.0.0-alpha.3
10
index.js
@@ -28,3 +28,3 @@ "use strict"; | ||
var _b = _a.memoryOnly, memoryOnly = _b === void 0 ? false : _b, stringifyOptions = tslib_1.__rest(_a, ["memoryOnly"]); | ||
var query = _this.sortQuery(query_string_1.default.stringify(data, stringifyOptions)); | ||
var query = _this.sortQuery("?" + query_string_1.default.stringify(data, stringifyOptions)); | ||
_this.stateQuery = query; | ||
@@ -56,3 +56,9 @@ _this.updateQueryStringState(query); | ||
QueryString.prototype.sortQuery = function (query) { | ||
return query.split("&").sort().join("&"); | ||
var prefix = ""; | ||
var params = query; | ||
if (/^\?/.test(query)) { | ||
prefix = "?"; | ||
params = query.substring(1); | ||
} | ||
return prefix + params.split("&").sort().join("&"); | ||
}; | ||
@@ -59,0 +65,0 @@ QueryString.prototype.parseQueryString = function (query) { |
{ | ||
"name": "@bitcointrade/query-string-hoc", | ||
"version": "1.0.0-alpha.2", | ||
"version": "1.0.0-alpha.3", | ||
"repository": "git@github.com:cryptocurrencytrader/query-string-hoc.git", | ||
@@ -5,0 +5,0 @@ "author": "Rafael Tavares <rafael@tavares.email>", |
Sorry, the diff of this file is not supported yet
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
9938
106