npm.io
1.1.3 • Published 8 months ago

current-module-paths

Licence
MIT
Version
1.1.3
Deps
0
Size
4 kB
Vulns
0
Weekly
0
Stars
2

view on npm npm module downloads Gihub repo dependents Gihub package dependents Node.js CI

current-module-paths

Access to the CommonJS __filename and __dirname variables within ECMAScript modules.

Only use this module if your code depends on the above global variables being defined, otherwise use import.meta.

import currentModulePaths from 'current-module-paths'

const { __filename, __dirname } = currentModulePaths(import.meta.url)

2021-25 Lloyd Brookes <opensource@75lb.com>.

Keywords