mirror of
https://github.com/pezkuwichain/pezkuwi-mobile-app.git
synced 2026-05-30 07:41:01 +00:00
1 line
5.1 KiB
Plaintext
1 line
5.1 KiB
Plaintext
{"dependencies":[{"name":"./stringify.js","data":{"asyncType":null,"isESMImport":false,"locs":[{"start":{"line":4,"column":23,"index":127},"end":{"line":4,"column":48,"index":152}}],"key":"U9znv1EiqFk0Jmgme4GfflV+76A=","exportNames":["*"],"imports":1}}],"output":[{"data":{"code":"__d(function (global, require, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {\n \"use strict\";\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n exports.memoize = memoize;\n const stringify_js_1 = require(_dependencyMap[0], \"./stringify.js\");\n function defaultGetId() {\n return 'none';\n }\n /**\n * @name memoize\n * @description Memomize the function with a specific instanceId\n */\n function memoize(fn, {\n getInstanceId = defaultGetId\n } = {}) {\n const cache = {};\n const memoized = (...args) => {\n const stringParams = (0, stringify_js_1.stringify)(args);\n const instanceId = getInstanceId();\n if (!cache[instanceId]) {\n cache[instanceId] = {};\n }\n if (cache[instanceId][stringParams] === undefined) {\n cache[instanceId][stringParams] = fn(...args);\n }\n return cache[instanceId][stringParams];\n };\n memoized.unmemoize = (...args) => {\n const stringParams = (0, stringify_js_1.stringify)(args);\n const instanceId = getInstanceId();\n if (cache[instanceId]?.[stringParams] !== undefined) {\n delete cache[instanceId][stringParams];\n }\n };\n return memoized;\n }\n});","lineCount":40,"map":[[2,2,1,0],[2,14,1,12],[4,2,2,0,"Object"],[4,8,2,6],[4,9,2,7,"defineProperty"],[4,23,2,21],[4,24,2,22,"exports"],[4,31,2,29],[4,33,2,31],[4,45,2,43],[4,47,2,45],[5,4,2,47,"value"],[5,9,2,52],[5,11,2,54],[6,2,2,59],[6,3,2,60],[6,4,2,61],[7,2,3,0,"exports"],[7,9,3,7],[7,10,3,8,"memoize"],[7,17,3,15],[7,20,3,18,"memoize"],[7,27,3,25],[8,2,4,0],[8,8,4,6,"stringify_js_1"],[8,22,4,20],[8,25,4,23,"require"],[8,32,4,30],[8,33,4,30,"_dependencyMap"],[8,47,4,30],[8,68,4,47],[8,69,4,48],[9,2,5,0],[9,11,5,9,"defaultGetId"],[9,23,5,21,"defaultGetId"],[9,24,5,21],[9,26,5,24],[10,4,6,4],[10,11,6,11],[10,17,6,17],[11,2,7,0],[12,2,8,0],[13,0,9,0],[14,0,10,0],[15,0,11,0],[16,2,12,0],[16,11,12,9,"memoize"],[16,18,12,16,"memoize"],[16,19,12,17,"fn"],[16,21,12,19],[16,23,12,21],[17,4,12,23,"getInstanceId"],[17,17,12,36],[17,20,12,39,"defaultGetId"],[18,2,12,52],[18,3,12,53],[18,6,12,56],[18,7,12,57],[18,8,12,58],[18,10,12,60],[19,4,13,4],[19,10,13,10,"cache"],[19,15,13,15],[19,18,13,18],[19,19,13,19],[19,20,13,20],[20,4,14,4],[20,10,14,10,"memoized"],[20,18,14,18],[20,21,14,21,"memoized"],[20,22,14,22],[20,25,14,25,"args"],[20,29,14,29],[20,34,14,34],[21,6,15,8],[21,12,15,14,"stringParams"],[21,24,15,26],[21,27,15,29],[21,28,15,30],[21,29,15,31],[21,31,15,33,"stringify_js_1"],[21,45,15,47],[21,46,15,48,"stringify"],[21,55,15,57],[21,57,15,59,"args"],[21,61,15,63],[21,62,15,64],[22,6,16,8],[22,12,16,14,"instanceId"],[22,22,16,24],[22,25,16,27,"getInstanceId"],[22,38,16,40],[22,39,16,41],[22,40,16,42],[23,6,17,8],[23,10,17,12],[23,11,17,13,"cache"],[23,16,17,18],[23,17,17,19,"instanceId"],[23,27,17,29],[23,28,17,30],[23,30,17,32],[24,8,18,12,"cache"],[24,13,18,17],[24,14,18,18,"instanceId"],[24,24,18,28],[24,25,18,29],[24,28,18,32],[24,29,18,33],[24,30,18,34],[25,6,19,8],[26,6,20,8],[26,10,20,12,"cache"],[26,15,20,17],[26,16,20,18,"instanceId"],[26,26,20,28],[26,27,20,29],[26,28,20,30,"stringParams"],[26,40,20,42],[26,41,20,43],[26,46,20,48,"undefined"],[26,55,20,57],[26,57,20,59],[27,8,21,12,"cache"],[27,13,21,17],[27,14,21,18,"instanceId"],[27,24,21,28],[27,25,21,29],[27,26,21,30,"stringParams"],[27,38,21,42],[27,39,21,43],[27,42,21,46,"fn"],[27,44,21,48],[27,45,21,49],[27,48,21,52,"args"],[27,52,21,56],[27,53,21,57],[28,6,22,8],[29,6,23,8],[29,13,23,15,"cache"],[29,18,23,20],[29,19,23,21,"instanceId"],[29,29,23,31],[29,30,23,32],[29,31,23,33,"stringParams"],[29,43,23,45],[29,44,23,46],[30,4,24,4],[30,5,24,5],[31,4,25,4,"memoized"],[31,12,25,12],[31,13,25,13,"unmemoize"],[31,22,25,22],[31,25,25,25],[31,26,25,26],[31,29,25,29,"args"],[31,33,25,33],[31,38,25,38],[32,6,26,8],[32,12,26,14,"stringParams"],[32,24,26,26],[32,27,26,29],[32,28,26,30],[32,29,26,31],[32,31,26,33,"stringify_js_1"],[32,45,26,47],[32,46,26,48,"stringify"],[32,55,26,57],[32,57,26,59,"args"],[32,61,26,63],[32,62,26,64],[33,6,27,8],[33,12,27,14,"instanceId"],[33,22,27,24],[33,25,27,27,"getInstanceId"],[33,38,27,40],[33,39,27,41],[33,40,27,42],[34,6,28,8],[34,10,28,12,"cache"],[34,15,28,17],[34,16,28,18,"instanceId"],[34,26,28,28],[34,27,28,29],[34,30,28,32,"stringParams"],[34,42,28,44],[34,43,28,45],[34,48,28,50,"undefined"],[34,57,28,59],[34,59,28,61],[35,8,29,12],[35,15,29,19,"cache"],[35,20,29,24],[35,21,29,25,"instanceId"],[35,31,29,35],[35,32,29,36],[35,33,29,37,"stringParams"],[35,45,29,49],[35,46,29,50],[36,6,30,8],[37,4,31,4],[37,5,31,5],[38,4,32,4],[38,11,32,11,"memoized"],[38,19,32,19],[39,2,33,0],[40,0,33,1],[40,3]],"functionMap":{"names":["<global>","defaultGetId","memoize","memoized","memoized.unmemoize"],"mappings":"AAA;ACI;CDE;AEK;qBCE;KDU;yBEC;KFM;CFE"},"hasCjsExports":true},"type":"js/module"}]} |