MCPcopy Index your code
hub / github.com/developit/optimize-plugin / toTerserMap

Function toTerserMap

src/lib/util.js:23–29  ·  view source on GitHub ↗
(map)

Source from the content-addressed store, hash-verified

21 * @todo This should be deleted, as it's exclusively to make TypeScript happy.
22 */
23export function toTerserMap (map) {
24 if (typeof map === 'string') map = JSON.parse(map);
25 return typeof map === 'object' && map ? {
26 ...map,
27 version: String(map.version)
28 } : null;
29}
30
31/**
32 * Convert a Terser-style SourceMap to Babel-style, parsing if necessary.

Callers 1

processFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected