$ npm install current-module-paths
Access to __filename and __dirname within ECMAScript modules.
import currentModulePaths from 'current-module-paths'
const { __filename, __dirname } = currentModulePaths(import.meta.url)
© 2021-23 Lloyd Brookes <75pound@gmail.com>.
Tested by test-runner.
© 2010 - cnpmjs.org x YWFE | Home | YWFE