Extract package metadata with consistent presentation.
npm install --save @thebespokepixel/meta
Import (or require) the module…
import {dirname} from 'node:path'
import {fileURLToPath} from 'node:url'
import meta from '@thebespokepixel/meta'
const metadata = meta(dirname(fileURLToPath(import.meta.url))) // Start searching from inside this scripts module
Full documentation can be found at https://thebespokepixel.github.io/meta/