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

Function checkSourceMap

build-system/tasks/check-sourcemaps.js:158–165  ·  view source on GitHub ↗

* @param {string} map The map filepath to check * @param {boolean} checkMappings Whether to test a mapping points to a correct source.

(map, checkMappings)

Source from the content-addressed store, hash-verified

156 * @param {boolean} checkMappings Whether to test a mapping points to a correct source.
157 */
158function checkSourceMap(map, checkMappings) {
159 const sourcemapJson = getSourcemapJson(map);
160 checkSourcemapUrl(sourcemapJson, map);
161 checkSourcemapSources(sourcemapJson, map);
162 if (checkMappings) {
163 checkSourcemapMappings(sourcemapJson, map);
164 }
165}
166
167/**
168 * Checks sourcemaps generated during minified compilation for correctness.

Callers 1

checkSourcemapsFunction · 0.85

Calls 4

getSourcemapJsonFunction · 0.85
checkSourcemapUrlFunction · 0.85
checkSourcemapSourcesFunction · 0.85
checkSourcemapMappingsFunction · 0.85

Tested by

no test coverage detected