Improve sieve parser

This commit is contained in:
the-djmaze 2024-09-23 10:48:22 +02:00
parent 0a3a5f6d59
commit c773b852a1
11 changed files with 124 additions and 106 deletions

View file

@ -22,7 +22,7 @@ export const
koComputable = fn => ko.computed(fn, {'pure':true}),
arrayToString = (arr, separator) =>
arr.map(item => item.toString?.() || item).join(separator),
(arr || []).map(item => item.toString?.() || item).join(separator),
/*
getNotificationMessage = code => {
let key = getKeyByValue(Notifications, code);
@ -58,6 +58,8 @@ export const
serverErrorDesc(text);
},
getComparators = () => ['i;ascii-casemap'],
getMatchTypes = (validOnly = 1) => {
let result = [':is',':contains',':matches'];
// https://datatracker.ietf.org/doc/html/rfc6134#section-2.3