const operatorFns = {
'~': function contains(source, value) {
return source.indexOf(value) !== -1
},
'=': function isEqual(source, value) {
return source === value
},
'!': function isNotEqual(source, value) {
return source !== value
}
}
const eligibleOperators = /^[\~\!~=].*$/
function searchParameterExpressionParser(value) {
// TODO: We may have up to two operators: each operator, plus an optional negation operator (!)
if (eligibleOperators.test(value)) {
// First character will be an equality operator