current-module-paths
v1.1.2
Published
Access to __filename and __dirname within ECMAScript modules
Downloads
611,510
Maintainers
Readme
current-module-paths
Access to the CommonJS __filename
and __dirname
variables within ECMAScript modules.
import currentModulePaths from 'current-module-paths'
const { __filename, __dirname } = currentModulePaths(import.meta.url)
© 2021-24 Lloyd Brookes <[email protected]>.
Tested by test-runner.