current-module-paths
Access to __filename and __dirname within ECMAScript modules
Last updated a year ago by 75lb .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install current-module-paths 
SYNC missed versions from official npm registry.

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>.

Current Tags

  • 1.1.3                                ...           latest (a year ago)

6 Versions

  • 1.1.3                                ...           a year ago
  • 1.1.2                                ...           2 years ago
  • 1.1.1                                ...           4 years ago
  • 1.1.0                                ...           5 years ago
  • 1.0.0                                ...           5 years ago
  • 0.1.0                                ...           6 years ago
Maintainers (1)
Downloads
Total 26
Today 0
This Week 0
This Month 15
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (0)
None
Dependents (2)

© 2010 - cnpmjs.org x YWFE | Home | YWFE