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

x/source_map/lib/binary-search.js

Port of mozilla / source-map to deno.
Latest
import * as sourceMap from "https://deno.land/x/source_map@0.8.0-beta.1/lib/binary-search.js";

Functions

This is an implementation of binary search which will always try and return the index of the closest element if there is no exact hit. This is because mappings between original and generated line/col pairs are single points, and there is an implicit region between each of them, so a miss just means that you aren't on the very start of a region.