-
-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Description
const data = [
{ name: 'C-3PO' , description: 'Protocol droid.' , species: 'Droid' },
{ name: 'R2-D2' , description: 'Astromech droid built on Naboo.', species: 'Droid' },
{ name: 'Anakin Skywalker', description: 'Fallen Jedi, the chosen one.' , species: 'Human' },
{ name: 'Obi-Wan Kenobi' , description: 'Jedi Master.' , species: 'Human' },
{ name: 'Moon Moon' , description: 'Mentally challenged wolf.' , species: 'Wolf' },
];
console.log(data.filter(lucene('an NOT anakin')));
Expected: "Obi-Wan Kenobi"
Current result: Throws an error:
C:\…\lucene-filter\src\index.js:28
return lucene.operators[query.operator](
^
TypeError: lucene.operators[query.operator] is not a function
at compile (C:\…\lucene-filter\src\index.js:28:46)
at Object.<anonymous> (C:\…\index.js:52:25)
at Module._compile (internal/modules/cjs/loader.js:1185:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1205:10)
at Module.load (internal/modules/cjs/loader.js:1034:32)
at Function.Module._load (internal/modules/cjs/loader.js:923:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
at internal/main/run_main_module.js:17:47
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels