(pathURL)
| 24 | |
| 25 | /** @param {ImportMeta | string} pathURL */ |
| 26 | const __dirname = function dirname(pathURL) { |
| 27 | const dir = __filename(pathURL, true) |
| 28 | const regex = /\/$/ |
| 29 | return regex.test(dir) |
| 30 | ? dir |
| 31 | : fs.existsSync(dir) && fs.statSync(dir).isDirectory() |
| 32 | ? dir.replace(regex, '') |
| 33 | : path.dirname(dir) |
| 34 | } |
| 35 | |
| 36 | /** @param {ImportMeta | string} dir */ |
| 37 | const __require = function require(dir = import.meta) { |
nothing calls this directly
no test coverage detected