Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not contains binary operator (-=) #53

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/jsonselect.js
Expand Up @@ -148,7 +148,7 @@
// (4) the 'x' value placeholder // (4) the 'x' value placeholder
"(x)|" + "(x)|" +
// (5) binops // (5) binops
"(&&|\\|\\||[\\$\\^<>!\\*]=|[=+\\-*/%<>])|" + "(&&|\\|\\||[\\$\\^<>!\\*\\-]=|[=+\\-*/%<>])|" +
// (6) parens // (6) parens
"([\\(\\)])" + "([\\(\\)])" +
")" ")"
Expand All @@ -166,6 +166,7 @@
'$=': [ 5, function(lhs, rhs) { return is(lhs, 'string') && is(rhs, 'string') && lhs.lastIndexOf(rhs) === lhs.length - rhs.length; } ], '$=': [ 5, function(lhs, rhs) { return is(lhs, 'string') && is(rhs, 'string') && lhs.lastIndexOf(rhs) === lhs.length - rhs.length; } ],
'^=': [ 5, function(lhs, rhs) { return is(lhs, 'string') && is(rhs, 'string') && lhs.indexOf(rhs) === 0; } ], '^=': [ 5, function(lhs, rhs) { return is(lhs, 'string') && is(rhs, 'string') && lhs.indexOf(rhs) === 0; } ],
'*=': [ 5, function(lhs, rhs) { return is(lhs, 'string') && is(rhs, 'string') && lhs.indexOf(rhs) !== -1; } ], '*=': [ 5, function(lhs, rhs) { return is(lhs, 'string') && is(rhs, 'string') && lhs.indexOf(rhs) !== -1; } ],
'-=': [ 5, function(lhs, rhs) { return is(lhs, 'string') && is(rhs, 'string') && lhs.indexOf(rhs) === -1; } ],
'>': [ 5, function(lhs, rhs) { return is(lhs, 'number') && is(rhs, 'number') && lhs > rhs || is(lhs, 'string') && is(rhs, 'string') && lhs > rhs; } ], '>': [ 5, function(lhs, rhs) { return is(lhs, 'number') && is(rhs, 'number') && lhs > rhs || is(lhs, 'string') && is(rhs, 'string') && lhs > rhs; } ],
'<': [ 5, function(lhs, rhs) { return is(lhs, 'number') && is(rhs, 'number') && lhs < rhs || is(lhs, 'string') && is(rhs, 'string') && lhs < rhs; } ], '<': [ 5, function(lhs, rhs) { return is(lhs, 'number') && is(rhs, 'number') && lhs < rhs || is(lhs, 'string') && is(rhs, 'string') && lhs < rhs; } ],
'=': [ 3, function(lhs, rhs) { return lhs === rhs; } ], '=': [ 3, function(lhs, rhs) { return lhs === rhs; } ],
Expand Down Expand Up @@ -435,7 +436,7 @@
// THE EVALUATOR // THE EVALUATOR


function isArray(o) { function isArray(o) {
return Array.isArray ? Array.isArray(o) : return Array.isArray ? Array.isArray(o) :
toString.call(o) === "[object Array]"; toString.call(o) === "[object Array]";
} }


Expand Down