MCPcopy Create free account
hub / github.com/ampproject/amphtml / parseJSONObj

Function parseJSONObj

ads/vendors/adocean.js:64–66  ·  view source on GitHub ↗

* @param {string} str * @return {Object|undefined} * @throws {SyntaxError}

(str)

Source from the content-addressed store, hash-verified

62 * @throws {SyntaxError}
63 */
64function parseJSONObj(str) {
65 return str.match(/^\s*{/) ? parseJson(str) : undefined;
66}
67
68/**
69 * @param {string} keys

Callers 2

buildVarsFunction · 0.85
buildClustersFunction · 0.85

Calls 1

parseJsonFunction · 0.90

Tested by

no test coverage detected