MCPcopy
hub / github.com/webpack/webpack / parseJson

Function parseJson

lib/util/parseJson.js:31–39  ·  view source on GitHub ↗
(raw, reviver)

Source from the content-addressed store, hash-verified

29
30/** @type {ParseJsonFn} */
31const parseJson = (raw, reviver) => {
32 const txt = stripBOM(raw);
33
34 try {
35 return JSON.parse(txt, reviver);
36 } catch (err) {
37 throw new JSONParseError(/** @type {Error} */ (err), raw, txt);
38 }
39};
40
41module.exports = parseJson;

Callers 4

_createLoaderContextMethod · 0.85
_readRecordsMethod · 0.85
applyMethod · 0.85

Calls 2

stripBOMFunction · 0.85
parseMethod · 0.45

Tested by

no test coverage detected