Please export the operatorsMap from Data Query's filter-no-eval.js.
If exporting the operators map is not an option, consider introducing an enum which defines the operators as constants:
export enum Operators {
contains = 'contains',
doesnotcontain = 'doesnotcontain',
doesnotendwith = 'doesnotendwith',
doesnotstartwith = 'doesnotstartwith',
endswith = 'endswith',
eq = 'eq',
gt = 'gt',
gte = 'gte',
isempty = 'isempty',
isnotempty = 'isnotempty',
isnotnull = 'isnotnull',
isnull = 'isnull',
lt = 'lt',
lte = 'lte',
neq = 'neq',
startswith = 'startswith'
}
Hi,
I've just started to use the process method of the Data query library and there is no way of filtering a property that is an array, even as simple array such as Array<string>.
ie:
interface Person {
id: string;
name: string;
categoryIds: Array<string>
}
I have many instances where I have properties that are arrays of string ids, so was hoping to use this utility to help filter the data.
Whilst adding an additional operator such as includes would help, how about adding the ability to register a custom operators?
Thanks,
Anthony.