Skip to content

Commit a0c5226

Browse files
Byte reduction, I can do this passing just references
1 parent 73478fe commit a0c5226

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

‎src/js.cookie.js‎

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,7 @@
1919
}
2020
}(function () {
2121
function decode (value) {
22-
var matches = value.match(/(%[0-9A-Z]{2})+/g);
23-
while ( matches && matches.length ) {
24-
var match = matches.shift();
25-
value = value.replace(match, decodeURIComponent(match));
26-
}
27-
return value;
22+
return value.replace(/(%[0-9A-Z]{2})+/g, decodeURIComponent);
2823
}
2924

3025
function processRead (value, converter, json) {

0 commit comments

Comments
 (0)