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