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

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