Stricter number parsing when unpacking query
This commit is contained in:
1 parent
e6caa36aa0
commit
09defce511
1 file changed
+2
-3
+2
-3
@@ -70,9 +70,8 @@ normalize = (input) ->
|
|||||||
if (m = /^\/(.*?)\/(g?i?m?y?)$/.exec(input))
|
if (m = /^\/(.*?)\/(g?i?m?y?)$/.exec(input))
|
||||||
vals.push({'$regex' : new RegExp(m[1], m[2])})
|
vals.push({'$regex' : new RegExp(m[1], m[2])})
|
||||||
|
|
||||||
f = parseFloat(input)
|
if +input == parseFloat(input)
|
||||||
if not isNaN(f)
|
vals.push(+input)
|
||||||
vals.push(f)
|
|
||||||
|
|
||||||
d = new Date(input)
|
d = new Date(input)
|
||||||
if input.length >= 8 and d.getFullYear() > 1983
|
if input.length >= 8 and d.getFullYear() > 1983
|
||||||
|
|||||||
Reference in new issue
Block a user