The filter descriptors support accessor functions in the "field" option. It would be great to see this implemented in the sort, group, and aggregate options.
const result = process(items, {
filter: {
logic: "and",
filters: [{ field: x => x.getValue(), operator: "eq", value: 0 }], // <- supported
},
group: [
field: x => x.getValue(), // <- not supported
aggregates: [{ aggregate: "sum", field: x => x.getValue() }] // <- not supported
],
sort: [{ field: x => x.getValue(), dir: "desc" }] // <- not supported
});