Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
async _find (params = {}) {
const { query, filters, paginate } = this.filterQuery(params);
let values = _.values(this.store).filter(this.options.matcher(query));
const total = values.length;
if (filters.$sort !== undefined) {
values.sort(this.options.sorter(filters.$sort));
}
if (filters.$skip !== undefined) {
values = values.slice(filters.$skip);
}
if (filters.$limit !== undefined) {
values = values.slice(0, filters.$limit);
}
const result = {
total,