esm-dirname

v0.1.1
A stop-gap intended to help migrate older code to the new ECMAScript module syntax
esm

esm-dirname

This is a quick cludge almost entirely copied from here intended to help facilitate migration from CJS to ESM.

Usage:

import { dirname } from "esm-dirname";
const __dirname = dirname(import.meta);
npm i esm-dirname

Metadata

  • ISC
  • Whatever
  • Ændrew Rininsland
  • released 11/25/2019

Downloads

Maintainers