File tree 2 files changed +4
-17
lines changed
2 files changed +4
-17
lines changed Original file line number Diff line number Diff line change 6
6
"browser" : {
7
7
"./src/node/index.js" : " ./src/client.js" ,
8
8
"./lib/node/index.js" : " ./lib/client.js" ,
9
- "./test/support/server.js" : " ./test/support/blank.js" ,
10
- "re2" : false
9
+ "./test/support/server.js" : " ./test/support/blank.js"
11
10
},
12
11
"bugs" : {
13
12
"url" : " https://github.com/ladjs/superagent/issues"
27
26
"formidable" : " ^3.5.1" ,
28
27
"methods" : " ^1.1.2" ,
29
28
"mime" : " 2.6.0" ,
30
- "qs" : " ^6.11.0" ,
31
- "re2" : " ^1.21.3"
29
+ "qs" : " ^6.11.0"
32
30
},
33
31
"devDependencies" : {
34
32
"@babel/cli" : " ^7.20.7" ,
Original file line number Diff line number Diff line change 1
- let RE2 ;
2
- let hasRE2 = true ;
3
-
4
- try {
5
- RE2 = require ( 're2' ) ;
6
- } catch {
7
- hasRE2 = false ;
8
- }
9
-
10
- const SafeRegExp = hasRE2 ? RE2 : RegExp ;
11
-
12
1
13
2
/**
14
3
* Return the mime type for the given `str`.
@@ -125,7 +114,7 @@ exports.mixin = (target, source) => {
125
114
*/
126
115
127
116
exports . isGzipOrDeflateEncoding = ( res ) => {
128
- return new SafeRegExp ( / ^ \s * (?: d e f l a t e | g z i p ) \s * $ / ) . test ( res . headers [ 'content-encoding' ] ) ;
117
+ return new RegExp ( / ^ \s * (?: d e f l a t e | g z i p ) \s * $ / ) . test ( res . headers [ 'content-encoding' ] ) ;
129
118
} ;
130
119
131
120
/**
@@ -135,5 +124,5 @@ exports.isGzipOrDeflateEncoding = (res) => {
135
124
*/
136
125
137
126
exports . isBrotliEncoding = ( res ) => {
138
- return new SafeRegExp ( / ^ \s * (?: b r ) \s * $ / ) . test ( res . headers [ 'content-encoding' ] ) ;
127
+ return new RegExp ( / ^ \s * (?: b r ) \s * $ / ) . test ( res . headers [ 'content-encoding' ] ) ;
139
128
} ;
You can’t perform that action at this time.
0 commit comments