UNPKG

npm

Version:

a package manager for JavaScript

7 lines (5 loc) 295 B
// can't use read-package-json-fast, because we want to ensure // that we make as few changes as possible, even for safety issues. const { readFile } = require('node:fs/promises') const parse = require('json-parse-even-better-errors') module.exports = async path => parse(await readFile(path))