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

x/source_map/lib/util.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/util.js";

Variables

Normalize a given URL.

  • Convert backslashes.
  • Remove any ".." and "." segments.

Functions

Comparator between two mappings with inflated source and name strings where the generated positions are compared.

Compute the URL of a source given the the source root, the source's URL, and the source map's URL.

This is a helper function for getting values from parameter/options objects.

Joins two paths/URLs.

Strip any JSON XSSI avoidance prefix from the string (as documented in the source maps specification), and then parse the string as JSON.

Make a path relative to a URL or another path. If returning a relative URL is not possible, the original target will be returned. All returned URLs will be normalized.