source-map-mappings-wasm-api 0.5.0

Exported WebAssembly API for the `source-map-mappings` crate.
Documentation

The public JS API to the source-map-mappings crate.

Usage

  1. Instantiate the WebAssembly module, supplying a JS implementation of mapping_callback.

  2. Allocate space for the mappings string with allocate_mappings.

  3. Initialize the mappings string by copying the JS String's data into it.

  4. Parse the mappings with parse_mappings. Handle errors, if any.

  5. Query the resulting Mappings structure as needed with by_generated_location, by_original_location, compute_column_spans, original_location_for, generated_location_for, and all_generated_locations_for as needed.

  6. When finished with Mappings structure, dispose of it with free_mappings.