1.0.0 • Published 3 months ago

esm-consts v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
3 months ago

esm-consts

work with esm filepath and dirname pathing constants in imports as in commonjs nodejs environment

Demos can be found in the folder demos

USAGE:

import { getDirname, getFilename } from "./node_module/esm-constants/src/polyfill.__dirname.regex.js";
import { default as getpaths } from "esm-consts";

const __dirname = getDirname();
console.log(__dirname);

const __filename = getFilename();
console.log(__filename);