current-module-paths

1.1.2 • Public • Published

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

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 <75pound@gmail.com>.

Tested by test-runner.

Package Sidebar

Install

npm i current-module-paths

Weekly Downloads

164,926

Version

1.1.2

License

MIT

Unpacked Size

3.77 kB

Total Files

5

Last publish

Collaborators

  • 75lb