The public JS API to the source-map-mappings crate.
Usage
-
Instantiate the WebAssembly module, supplying a JS implementation of
mapping_callback. -
Allocate space for the mappings string with
allocate_mappings. -
Initialize the mappings string by copying the JS
String's data into it. -
Parse the mappings with
parse_mappings. Handle errors, if any. -
Query the resulting
Mappingsstructure as needed withby_generated_location,by_original_location,compute_column_spans,original_location_for,generated_location_for, andall_generated_locations_foras needed. -
When finished with
Mappingsstructure, dispose of it withfree_mappings.