Crate source_map_mappings_wasm_api [−] [src]
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
Mappings
structure as needed withby_generated_location
,by_original_location
,compute_column_spans
,original_location_for
,generated_location_for
, andall_generated_locations_for
as needed.When finished with
Mappings
structure, dispose of it withfree_mappings
.
Functions
all_generated_locations_for |
Find all mappings for the given original location, and invoke the
|
allocate_mappings |
Allocate space for a mappings string of the given size (in bytes). |
by_generated_location |
Invoke the |
by_original_location |
Invoke the |
compute_column_spans |
Compute column spans for the given mappings. |
free_mappings |
Destroy the given |
generated_location_for |
Find the mapping for the given original location, if any exists. |
get_last_error |
Get the last error's error code, or 0 if there was none. |
original_location_for |
Find the mapping for the given generated location, if any exists. |
parse_mappings |
Parse the given initialized mappings string into a |