Explorar o código

ignore case on regexp

Ivan Asmer %!s(int64=5) %!d(string=hai) anos
pai
achega
fe1a725981
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      expand.js

+ 1 - 1
expand.js

@@ -83,7 +83,7 @@ function mmExpandSchema(gqlSchema, defaultQueryFields, defaultMutationFields){
                                 if (val && typeof val === 'string' && val.startsWith('/') && val.endsWith('/')){
                                     console.log('regexp found' ,val )
                                     try {
-                                        return new RegExp(val.slice(1, -1))
+                                        return new RegExp(val.slice(1, -1), 'i')
                                     }
                                     catch (e){
                                         return val