deno-dirname

Node-style __dirname and __filename polyfill for Deno

Inspired by denoland/deno#2125 issue by @zekth

Usage

import { __ } from 'https://deno.land/x/dirname/mod.ts';
const { __filename, __dirname } = __(import.meta);

console.log(__dirname);
console.log(__filename);

Issues

For any bug reports or feature requests please post an issue on GitHub.

Author

RafaƂ Pocztarski
Follow on GitHub Follow on Twitter
Follow on Stack Exchange

License

MIT License (Expat). See LICENSE.md for details.


View repository on GitHub