@bitcointrade/query-string-hoc
Advanced tools
Comparing version 1.0.0-alpha to 1.0.0-alpha.1
@@ -9,3 +9,3 @@ import { ParseOptions, StringifyOptions } from "query-string"; | ||
} | ||
export declare type SetQueryString = (data: object, options: SetQueryStringOptions) => void; | ||
export declare type SetQueryString = (data: object, options?: SetQueryStringOptions) => void; | ||
export interface QueryStringInjectedProps { | ||
@@ -12,0 +12,0 @@ queryString: { |
@@ -28,3 +28,3 @@ "use strict"; | ||
var _b = _a.memoryOnly, memoryOnly = _b === void 0 ? false : _b, stringifyOptions = tslib_1.__rest(_a, ["memoryOnly"]); | ||
var url = _this.sortUrl(location.href.split("?")[0] + "?" + query_string_1.default.stringify(data, stringifyOptions)); | ||
var url = _this.sortUrl(location.href.split(/\?/)[0] + "?" + query_string_1.default.stringify(data, stringifyOptions)); | ||
if (memoryOnly) { | ||
@@ -63,7 +63,7 @@ _this.stateUrl = url; | ||
if (url === void 0) { url = location.href; } | ||
var _a = tslib_1.__read(url.split("?"), 2), path = _a[0], params = _a[1]; | ||
return params ? path + params.split("&").sort().join("&") : path; | ||
var _a = tslib_1.__read(url.split(/\?/), 2), path = _a[0], params = _a[1]; | ||
return params ? path + "?" + params.split("&").sort().join("&") : path; | ||
}; | ||
QueryString.prototype.parseQueryString = function (url) { | ||
var data = query_string_1.default.parse(url.split("?")[1], options.parse); | ||
var data = query_string_1.default.parse(url.split(/\?/)[1] || "", options.parse); | ||
return parseTransform ? parseTransform(data) : data; | ||
@@ -70,0 +70,0 @@ }; |
{ | ||
"name": "@bitcointrade/query-string-hoc", | ||
"version": "1.0.0-alpha", | ||
"version": "1.0.0-alpha.1", | ||
"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
10196