Enterprise-level package getter.
pkgplz asynchronously retrieves the package.json at root and returns null if none is found.
npm install pkgplz
yarn add pkgplz
import pkgplz from 'pkgplz';
const pkg = await pkgplz();
console.log(pkg?.name); const pkgplz = require('pkgplz');
pkgplz().then(pkg => {
console.log(pkg?.name);
});import pkgplz from 'pkgplz/sync';
const pkg = pkgplz();
console.log(pkg?.name);const pkgplz = require('pkgplz/sync');
const pkg = pkgplz();
console.log(pkg?.name);Licensed under the Apache License 2.0.