@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');

Readme

Keywords

none

Package Sidebar

Install

npm i @5app/esm-helpers

Weekly Downloads

231

Version

0.0.3

License

ISC

Unpacked Size

2.58 kB

Total Files

3

Last publish

Collaborators

  • adodson
  • diondiondion
  • ikhemissi
  • 5app-bot