@json-api/query-parser
Advanced tools
Comparing version 0.2.4 to 0.2.5
@@ -188,9 +188,9 @@ /* | ||
peg$c27 = peg$classExpectation(["`"], true, false), | ||
peg$c28 = "'", | ||
peg$c29 = peg$literalExpectation("'", false), | ||
peg$c30 = /^[^']/, | ||
peg$c31 = peg$classExpectation(["'"], true, false), | ||
peg$c32 = function(content) { | ||
peg$c28 = function(content) { | ||
return decodeURIComponent(content.join('')); | ||
}, | ||
peg$c29 = "'", | ||
peg$c30 = peg$literalExpectation("'", false), | ||
peg$c31 = /^[^']/, | ||
peg$c32 = peg$classExpectation(["'"], true, false), | ||
peg$c33 = peg$otherExpectation("symbol (i.e., a field or operator name)"), | ||
@@ -818,3 +818,4 @@ peg$c34 = /^[0-9\-.]/, | ||
if (s3 !== peg$FAILED) { | ||
s1 = [s1, s2, s3]; | ||
peg$savedPos = s0; | ||
s1 = peg$c28(s2); | ||
s0 = s1; | ||
@@ -836,11 +837,11 @@ } else { | ||
if (input.charCodeAt(peg$currPos) === 39) { | ||
s1 = peg$c28; | ||
s1 = peg$c29; | ||
peg$currPos++; | ||
} else { | ||
s1 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c29); } | ||
if (peg$silentFails === 0) { peg$fail(peg$c30); } | ||
} | ||
if (s1 !== peg$FAILED) { | ||
s2 = []; | ||
if (peg$c30.test(input.charAt(peg$currPos))) { | ||
if (peg$c31.test(input.charAt(peg$currPos))) { | ||
s3 = input.charAt(peg$currPos); | ||
@@ -850,7 +851,7 @@ peg$currPos++; | ||
s3 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c31); } | ||
if (peg$silentFails === 0) { peg$fail(peg$c32); } | ||
} | ||
while (s3 !== peg$FAILED) { | ||
s2.push(s3); | ||
if (peg$c30.test(input.charAt(peg$currPos))) { | ||
if (peg$c31.test(input.charAt(peg$currPos))) { | ||
s3 = input.charAt(peg$currPos); | ||
@@ -860,3 +861,3 @@ peg$currPos++; | ||
s3 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c31); } | ||
if (peg$silentFails === 0) { peg$fail(peg$c32); } | ||
} | ||
@@ -866,11 +867,11 @@ } | ||
if (input.charCodeAt(peg$currPos) === 39) { | ||
s3 = peg$c28; | ||
s3 = peg$c29; | ||
peg$currPos++; | ||
} else { | ||
s3 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c29); } | ||
if (peg$silentFails === 0) { peg$fail(peg$c30); } | ||
} | ||
if (s3 !== peg$FAILED) { | ||
peg$savedPos = s0; | ||
s1 = peg$c32(s2); | ||
s1 = peg$c28(s2); | ||
s0 = s1; | ||
@@ -877,0 +878,0 @@ } else { |
@@ -164,2 +164,8 @@ "use strict"; | ||
}); | ||
describe("String", () => { | ||
it("should support backtick + single quote strings", () => { | ||
expect(parseFilter("(`test`,'test2')")) | ||
.to.deep.equal([helpers_1.RawFieldExpression(['test', 'test2'])]); | ||
}); | ||
}); | ||
describe("Boolean, number, null", () => { | ||
@@ -166,0 +172,0 @@ it("should parse them into their js equivalents", () => { |
{ | ||
"name": "@json-api/query-parser", | ||
"version": "0.2.4", | ||
"version": "0.2.5", | ||
"description": "A query parser for the ?filter and ?sort param syntax used by @json-api/server", | ||
@@ -5,0 +5,0 @@ "main": "build/src/index.js", |
59685
1711