Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/npm/cli
/ read-json.js
File
read-json.js
workspaces/libnpmversion/lib/read-json.js:None–None ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
1
// can't use read-package-json-fast, because we want to ensure
2
// that we make as few changes as possible, even for safety issues.
3
const
{ readFile } = require(
'node:fs/promises'
)
4
const
parse = require(
'json-parse-even-better-errors'
)
Callers
nothing calls this directly
Calls
2
readFile
Function · 0.85
parse
Function · 0.50
Tested by
no test coverage detected