Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/source_map/lib/mapping-list.js>default

Port of mozilla / source-map to deno.
Latest
class default
import { default } from "https://deno.land/x/source_map@0.8.0-beta.1/lib/mapping-list.js";

A data structure to provide a sorted view of accumulated mappings in a performance conscious manner. It trades a negligible overhead in general case for a large speedup in case of mappings being added in order.

Constructors

new
default()

Methods

add(aMapping)

Add the given source mapping.

Returns the flat, sorted array of mappings. The mappings are sorted by generated position.

WARNING: This method returns internal data without copying, for performance. The return value must NOT be mutated, and should be treated as an immutable borrow. If you want to take ownership, you must make your own copy.

unsortedForEach(aCallback, aThisArg)

Iterate through internal items. This method takes the same arguments that Array.prototype.forEach takes.

NOTE: The order of the mappings is NOT guaranteed.