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

Function toBabelMap

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

Source from the content-addressed store, hash-verified

35 * @todo This should be deleted, as it's exclusively to make TypeScript happy.
36 */
37export function toBabelMap (map) {
38 if (typeof map === 'string') map = JSON.parse(map);
39 return typeof map === 'object' && map ? {
40 file: '',
41 ...map,
42 version: parseInt(map.version, 10)
43 } : null;
44}
45
46const DEFAULT_COREJS_VERSION = 2;
47

Callers 2

processFunction · 0.90
renderChunkFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected