Same name in other branches
  1. 5.0.x advagg_js_minify/jspacker.inc \JavaScriptPacker::JSFUNCTION_decodeBody
  2. 6.0.x advagg_js_minify/jspacker.inc \JavaScriptPacker::JSFUNCTION_decodeBody
  3. 7.x-1.x advagg_js_compress/jspacker.inc \JavaScriptPacker::JSFUNCTION_decodeBody
  4. 7.x-2.x advagg_js_compress/jspacker.inc \JavaScriptPacker::JSFUNCTION_decodeBody
  5. 8.x-3.x advagg_js_minify/jspacker.inc \JavaScriptPacker::JSFUNCTION_decodeBody
  6. 8.x-4.x advagg_js_minify/jspacker.inc \JavaScriptPacker::JSFUNCTION_decodeBody

Fichier

advagg_js_minify/jspacker.inc, line 512

Classe

JavaScriptPacker

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;
    }
';