Concepts

Source map source metadata

Try the free JavaScript compiler

A source map can carry original source text as optional sourcesContent. This example inspects explicit data, not browser source-map loading.

Formal Syntax & Structure

javascript syntaxjavascript
{version:3, sources, sourcesContent, mappings, names}

Working Example

Example Snippetjavascript
(async () => {const map={version:3,sources:["price.js"],sourcesContent:["export const price = 2;"],names:[],mappings:"AAAA"};console.log(map.version,map.sources[0],map.sourcesContent[0].includes("price"));})()
JavaScript Reference