Server IP : 162.213.251.212 / Your IP : 3.149.238.13 [ Web Server : LiteSpeed System : Linux business55.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64 User : allssztx ( 535) PHP Version : 8.1.31 Disable Function : NONE Domains : 1 Domains MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /proc/self/root/proc/self/root/home/allssztx/www/easybuyer/node_modules/import-fresh/ |
Upload File : |
'use strict'; const path = require('path'); const resolveFrom = require('resolve-from'); const callerPath = require('caller-path'); module.exports = moduleId => { if (typeof moduleId !== 'string') { throw new TypeError('Expected a string'); } const filePath = resolveFrom(path.dirname(callerPath()), moduleId); // Delete itself from module parent if (require.cache[filePath] && require.cache[filePath].parent) { let i = require.cache[filePath].parent.children.length; while (i--) { if (require.cache[filePath].parent.children[i].id === filePath) { require.cache[filePath].parent.children.splice(i, 1); } } } // Delete module from cache delete require.cache[filePath]; // Return fresh module return require(filePath); };