Jelajahi Sumber

ignore case on regexp

Ivan Asmer 4 tahun lalu
induk
melakukan
fe1a725981
1 mengubah file dengan 1 tambahan dan 1 penghapusan
  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