Node.js module that returns the current script dirname. Similar to __dirname
but also works in ES modules.
yarn add es-dirname
import dirname from 'es-dirname'
console.log(dirname()) // outputs "/path/to/the"
console.log(require('es-dirname')() === __dirname) // true