Normally Palatable Mango

    @5app/esm-helpers

    0.0.2 • 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');

    Keywords

    none

    Install

    npm i @5app/esm-helpers

    DownloadsWeekly Downloads

    214

    Version

    0.0.2

    License

    ISC

    Unpacked Size

    2.42 kB

    Total Files

    3

    Last publish

    Collaborators

    • adodson
    • diondiondion
    • ikhemissi
    • charles5app
    • 5app-bot