es-dirname
Node.js module that returns the current script dirname. Similar to __dirname
but also works in ES modules.
Installation
yarn add es-dirname
Usage
/path/to/the/script.mjs
console // outputs "/path/to/the"
CommonJs
console // true
Node.js module that returns the current script dirname. Similar to __dirname
but also works in ES modules.
yarn add es-dirname
console // outputs "/path/to/the"
console // true
npm i es-dirname
11,733
0.1.0
none
1.09 kB
4