diegohaz/querymen

Filter by case insensitive regex

patrykgulas opened this issue · 1 comments

Is it possible to filter records by case insensitive regex? My current implementation looks like:

router.get('/',
  token({ required: true }),
  query(),
  querymen.middleware({
    name: {
      type: String,
      paths: ['name'],
      operator: '$regex'
    }
  }),
  index)

Just use type: RegExp (without operator):

router.get('/',
  token({ required: true }),
  query(),
  querymen.middleware({
    name: {
      type: RegExp,
      paths: ['name']
    }
  }),
  index)