@5app/esm-helpers

0.0.3 • Public • Published

ESM Helpers

CircleCI

ESM Helpers provides shims for working with NodeJS using ESM

import {dirName, requireJSON} from 'esm-helpers';

// Recreate __dirname
const __dirname === dirName(import.meta);

// Load JSON files from a relative path
// Replaces `require('./package.json')`
const myJSON = await requireJSON(import.meta, './package.json');

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.3
    101
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.0.3
    101
  • 0.0.2
    0
  • 0.0.1
    0

Package Sidebar

Install

npm i @5app/esm-helpers

Weekly Downloads

101

Version

0.0.3

License

ISC

Unpacked Size

2.58 kB

Total Files

3

Last publish

Collaborators

  • adodson
  • diondiondion
  • ikhemissi
  • 5app-bot