@bitovi/querystring-parser
Advanced tools
Comparing version 0.5.1 to 0.5.2
@@ -7,2 +7,3 @@ const FilterStyle = require("../enums/filter-style"); | ||
function determineFilterStyle(querystring) { | ||
querystring = decodeURI(querystring); | ||
if (isString(querystring) && querystring.length) { | ||
@@ -9,0 +10,0 @@ const isMongoDB = querystring.includes("filter["); |
{ | ||
"name": "@bitovi/querystring-parser", | ||
"version": "0.5.1", | ||
"version": "0.5.2", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -31,2 +31,8 @@ /* eslint-disable jest/expect-expect */ | ||
test("should handle still-encoded querystrings just fine", () => { | ||
const querystring = | ||
"filter%5Bproject_id%5D%5B%24eq%5D=b730e204-1218-4e9d-aa15-773c892baefb"; | ||
expect(determineFilterStyle(querystring)).toBe(FilterStyle.MONGO_DB); | ||
}); | ||
test("should throw error if multiple styles are detected", () => { | ||
@@ -33,0 +39,0 @@ expect(() => { |
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
117970
2935