Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on Mar 28, 2024 via pnpm

@jridgewell/trace-mapping 0.3.17

Trace the original position through a source map
Package summary
Share
0
issues
1
license
3
MIT
Package created
18 Jan 2022
Version published
14 Oct 2022
Maintainers
1
Total deps
3
Direct deps
2
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
3 Packages, Including:
@jridgewell/resolve-uri@3.1.0
@jridgewell/sourcemap-codec@1.4.14
@jridgewell/trace-mapping@0.3.17
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

2
All Dependencies CSV
β“˜ This is a list of @jridgewell/trace-mapping 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
@jridgewell/resolve-uri3.1.09.62 kBMIT
prod
@jridgewell/sourcemap-codec1.4.148.19 kBMIT
prod

Visualizations

Frequently Asked Questions

What does @jridgewell/trace-mapping do?

The @jridgewell/trace-mapping package serves as a powerful tool for developers working with JavaScript source maps. This package aids in tracing the original location in a source file from the line and column of an output file via a source map. For those already acquainted with the source-map package's SourceMapConsumer, they will find this package delivers similar functionalities like originalPositionFor and generatedPositionFor API without the necessity of WASM.

How do you use @jridgewell/trace-mapping?

To utilize @jridgewell/trace-mapping, you first need to install the package via npm using the command npm install @jridgewell/trace-mapping. Then, you can import the required functions from @jridgewell/trace-mapping in your script.

Here is an example of its usage:

import {
  TraceMap,
  originalPositionFor,
  generatedPositionFor,
  sourceContentFor,
} from '@jridgewell/trace-mapping';

const tracer = new TraceMap({
  version: 3,
  sources: ['input.js'],
  sourcesContent: ['content of input.js'],
  names: ['foo'],
  mappings: 'KAyCIA',
});

// Lines start at line 1, columns at column 0.
const traced = originalPositionFor(tracer, { line: 1, column: 5 });
//...

You can also use it for sectioned sourcemaps by utilizing the AnyMap helper:

import { AnyMap } from '@jridgewell/trace-mapping';

const sectioned = new AnyMap({
  version: 3,
  sections: [
    // Your sections here...
  ],
});

const traced = originalPositionFor(sectioned, {
  line: 2,
  column: 0,
});
//...

Where are the @jridgewell/trace-mapping docs?

The documentation for the @jridgewell/trace-mapping package isn't hosted on a dedicated site but is instead available directly on the package's GitHub page. Here you'll find detailed explanations of the package's functionalities, requirements, and usage examples.