MCPcopy Create free account
hub / github.com/bigcommerce/stencil-cli / parse

Function parse

lib/parse-json.js:3–9  ·  view source on GitHub ↗
(jsonString, file = '')

Source from the content-addressed store, hash-verified

1import parseJson from 'parse-json';
2
3export function parse(jsonString, file = '') {
4 try {
5 return parseJson(jsonString);
6 } catch (e) {
7 throw new Error(`${file} - ${e.message}`);
8 }
9}
10export default {
11 parse,
12};

Callers 2

throwsFunction · 0.90
parseJsonFileFunction · 0.90

Calls

no outgoing calls

Tested by 1

throwsFunction · 0.72