Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
find(state, name, predicate, filter) {
const { query, filters } = filterQuery(predicate || {});
const data = values(getData(state, name));
if (filters.$sort) {
data.sort(sorter(filters.$sort));
}
if (filter) {
sift.use(filter);
}
return sift(toSiftQuery(query), data);
},
first(state, name, predicate) {