constant JavaScriptPacker::JSFUNCTION_decodeBody in Advanced CSS/JS Aggregation 7
Same name and namespace in other branches
- 8.4 advagg_js_minify/jspacker.inc \JavaScriptPacker::JSFUNCTION_decodeBody
- 8.2 advagg_js_minify/jspacker.inc \JavaScriptPacker::JSFUNCTION_decodeBody
- 8.3 advagg_js_minify/jspacker.inc \JavaScriptPacker::JSFUNCTION_decodeBody
- 6 advagg_js_compress/jspacker.inc \JavaScriptPacker::JSFUNCTION_decodeBody
- 7.2 advagg_js_compress/jspacker.inc \JavaScriptPacker::JSFUNCTION_decodeBody
File
- advagg_js_compress/
jspacker.inc, line 496
Class
Code
const JSFUNCTION_decodeBody = ' if (!\'\'.replace(/^/, String)) {
// decode all the values we need
while ($count--) {
$decode[$encode($count)] = $keywords[$count] || $encode($count);
}
// global replacement function
$keywords = [function ($encoded) {return $decode[$encoded]}];
// generic match
$encode = function () {return \'\\\\w+\'};
// reset the loop counter - we are now doing a global replace
$count = 1;
}
';