Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
static find>(
state: EntityState,
query: WhereQuery
): ResponseEntity[] {
const { entityName, where, sort, skip, limit } = query;
let filtered = retrieve(this.getAll(state, entityName), where);
if (sort != null) {
filtered = sortByNotation(filtered, sort);
}
const skipVal = skip || 0;
const limitVal = limit != null ? limit + skipVal : filtered.length;
return filtered.slice(skipVal, limitVal);
}
/**