Source Map v3 comment conversion

@stackline/convert-source-map

Encode, decode, find, and remove source-map comments with the established API, first-party types, and a linear source scanner.

npm install @stackline/convert-source-map
v1.0.1Zero runtime dependenciesNode 12+TypeScript 3.9-7.0

Runs the production browser bundle

Source-map converter

Input

Source Map JSON

Output


            
Ready 0 input bytes 0 output bytes

Lowest-change migration

Keep the original import name

Use an npm alias when existing build code requires convert-source-map.

npm install convert-source-map@npm:@stackline/convert-source-map
const convert = require('convert-source-map');

Public contract

Conversion and scanning API

Full reference
APIPurposeReturn
fromComment(comment)Decode an inline data URIConverter
fromSource(source)Find the last inline mapConverter or null
removeComments(source)Remove inline maps in one scanString
fromObject(map)Create a mutable converterConverter
toComment(options?)Create line or block commentsString

Release evidence

Parser behavior is measured

19
focused regression tests
10
differential upstream scenarios
500k
malformed lines in the resource test
0
runtime dependencies

Machine-readable documentation

AI and crawler resources

#Stackline #SourceMaps #JavaScript #OpenSource #NPM #AIReadyDocs