$ npm install filedirname
Ponyfill for __filename and __dirname in ESM environments (Deno, .mjs)
import filedirname from 'https://unpkg.com/filedirname/edition-deno/index.ts'
const { __filename, __dirname } = filedirname(import.meta.url)
import filedirname from 'https://unpkg.com/filedirname'
const { __filename, __dirname } = filedirname(import.meta.url)
npm install --save filedirnameimport pkg from ('filedirname')const pkg = require('filedirname').defaultimport pkg from 'https://unpkg.com/filedirname@^1.0.1/edition-deno/index.ts'
This package is published with the following editions:
filedirname/source/index.ts is TypeScript source code with Import for modulesfiledirname/edition-node-esm/index.js is TypeScript compiled against ESNext for Node.js with Import for modulesfiledirname/edition-deno/index.ts is TypeScript source code made to be compatible with DenoDiscover the release history by heading on over to the HISTORY.md file.
Discover how you can contribute by heading on over to the CONTRIBUTING.md file.
These amazing people are maintaining this project:
No sponsors yet! Will you be the first?
These amazing people have contributed code to this project:
Discover how you can contribute by heading on over to the CONTRIBUTING.md file.
Unless stated otherwise all works are:
and licensed under:
© 2010 - cnpmjs.org x YWFE | Home | YWFE