sourcemap 1.0.0

Source maps parser

Released 2017-02-22.

To install, run:

haxelib install sourcemap 1.0.0

See using Haxelib in Haxelib documentation for more information.

MaintainerRealyUniqueName
Websitehttps://github.com/RealyUniqueName/sourcemap
Current version1.0.0
StatisticsInstalled 300 times
LicenseMIT
Tags debug, map, mapping, source, sourcemap

README.md

Source maps

Cross platform source map parser for Haxe programming language.

Usage

var data : String = "Contents of some .js.map file";
var map = new SourceMap(data);

var pos : sourcemap.SourcePos = map.originalPositionFor(1, 3);
trace(pos);
/*
	Outputs:
	{
		generatedLine:1,
		generatedColumn:3,
		originalColumn:10,
		originalLine:3,
		source:"/path/to/Test.hx",
		name:"methodName"
	}
*/

map.eachMapping(function (pos:sourcemap.SourcePos) {
	trace(pos);
});