1
0
Fork 0
mirror of synced 2024-10-02 18:16:29 +13:00

Removed notOneOf

This commit is contained in:
Mel O'Hagan 2022-06-24 21:29:19 +01:00
parent 40a2e95185
commit abcf9752c1
2 changed files with 1 additions and 12 deletions

View file

@ -46,10 +46,6 @@ export const OperatorOptions = {
value: "oneOf",
label: "Is in",
},
NotIn: {
value: "notOneOf",
label: "Is not in",
},
}
// Cookie names

View file

@ -94,7 +94,6 @@ export const buildLuceneQuery = filter => {
contains: {},
notContains: {},
oneOf: {},
notOneOf: {},
}
if (Array.isArray(filter)) {
filter.forEach(expression => {
@ -219,11 +218,6 @@ export const runLuceneQuery = (docs, query) => {
return !testValue?.includes(docValue)
})
// Process a not included match (fails if the value is included)
const notOneOf = match("notOneOf", (docValue, testValue) => {
return testValue?.includes(docValue)
})
// Match a document against all criteria
const docMatch = doc => {
return (
@ -234,8 +228,7 @@ export const runLuceneQuery = (docs, query) => {
notEqualMatch(doc) &&
emptyMatch(doc) &&
notEmptyMatch(doc) &&
oneOf(doc) &&
notOneOf(doc)
oneOf(doc)
)
}