import { HookContext } from '@feathersjs/feathers'; import _ from 'lodash'; const ignoreCaseRegex = async (context: HookContext): Promise => { context.params.query = _.mapValues(context.params.query, (data, key) => { return key.startsWith('$') ? data : _.set(data, '$options', 'i'); }); return context; }; export default ignoreCaseRegex;