UNPKG

restringer

Version:

Deobfuscate Javascript with emphasis on reconstructing strings

20 lines (17 loc) 370 B
let cache = {}; let relevantScriptHash = null; /** * @param {string} currentScriptHash * @return {object} The relevant cache object. */ function getCache(currentScriptHash) { if (currentScriptHash !== relevantScriptHash) { relevantScriptHash = currentScriptHash; cache = {}; } return cache; } getCache.flush = function() { cache = {}; }; export {getCache};