JSPM

current-module-paths

1.1.2
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 151248
  • Score
    100M100P100Q171913F
  • License MIT

Access to __filename and __dirname within ECMAScript modules

Package Exports

  • current-module-paths

Readme

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.