File tree Expand file tree Collapse file tree 2 files changed +4
-5
lines changed
Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change 22
33const fastDecode = require ( "fast-decode-uri-component" ) ;
44
5+ const plusRegex = / \+ / g;
6+
57/**
68 * @callback parse
79 * @param {string } input
@@ -45,7 +47,7 @@ function parse(input) {
4547 if ( hasBothKeyValuePair || i - startingIndex > 1 ) {
4648 // Optimization: Replace '+' with space
4749 if ( keyHasPlus ) {
48- key = key . replaceAll ( "+" , " " ) ;
50+ key = key . replace ( plusRegex , " " ) ;
4951 }
5052
5153 // Optimization: Do not decode if it's not necessary.
@@ -55,7 +57,7 @@ function parse(input) {
5557
5658 if ( hasBothKeyValuePair ) {
5759 if ( valueHasPlus ) {
58- value = value . replaceAll ( "+" , " " ) ;
60+ value = value . replace ( plusRegex , " " ) ;
5961 }
6062
6163 if ( shouldDecodeValue ) {
Original file line number Diff line number Diff line change 44 "description" : " " ,
55 "main" : " lib/index.js" ,
66 "type" : " commonjs" ,
7- "engines" : {
8- "node" : " >= 15.0.0"
9- },
107 "scripts" : {
118 "format" : " rome format . --write" ,
129 "format:ci" : " rome format ." ,
You can’t perform that action at this time.
0 commit comments