gmail-string-query
Simulate GMail search queries using Lucene Filters
Fork of finwo/lucene-filter.
Changes:
- implicit operator is AND not OR
- support for
label:name
queries - depends on
lucene-query-parse
only
Installation
npm i -s gmail-string-queryyarn add gmail-string-query
Example
; const data = id: 1 to: "someone1@gmail.com" from: "sender1@gmail.com" // labels have to be a string separated by commas under the `label` key label: "foo,bar,!s-baz" id: 2 to: "someone1@gmail.com" from: "sender1@gmail.com" label: "foo" id: 3 to: "someone2@gmail.com" from: "sender1@gmail.com" label: "!s-baz" ; const result = data;console; // -> [1, 3]
Why?
Part of GMail API mock used in taskbot