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 14, 2024 via pnpm

@jridgewell/gen-mapping 0.3.2

Generate source maps
Package summary
Share
0
issues
1
license
5
MIT
Package created
27 Apr 2022
Version published
26 Jun 2022
Maintainers
1
Total deps
5
Direct deps
3
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
5 Packages, Including:
@jridgewell/gen-mapping@0.3.2
@jridgewell/resolve-uri@3.1.2
@jridgewell/set-array@1.2.1
@jridgewell/sourcemap-codec@1.4.15
@jridgewell/trace-mapping@0.3.25
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

3
All Dependencies CSV
β“˜ This is a list of @jridgewell/gen-mapping 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
@jridgewell/set-array1.2.117.52 kBMIT
prod
@jridgewell/sourcemap-codec1.4.158.72 kBMIT
prod
@jridgewell/trace-mapping0.3.25165.36 kBMIT
prod

Visualizations

Frequently Asked Questions

What does @jridgewell/gen-mapping do?

The @jridgewell/gen-mapping package is a tool that enables developers to generate source maps during the process of code transpilation or minification. This allows users to trace back to the original location in the source file for enhanced debugging. This feature can be useful either when using Chrome's DevTools or employing libraries such as @jridgewell/trace-mapping. You might be familiar with the source-map package, as @jridgewell/gen-mapping provides the same addMapping and setSourceContent API.

How do you use @jridgewell/gen-mapping?

To use @jridgewell/gen-mapping, developers need to first install the package through npm with this command: npm install @jridgewell/gen-mapping. Once installed, you can use it in your code. Here's an example on how you add source content and mappings:

import { GenMapping, addMapping, setSourceContent, toEncodedMap, toDecodedMap } from '@jridgewell/gen-mapping';

const map = new GenMapping({
  file: 'output.js',
  sourceRoot: 'https://example.com/',
});

setSourceContent(map, 'input.js', `function foo() {}`);

addMapping(map, {
  generated: { line: 1, column: 0 },
  source: 'input.js',
  original: { line: 1, column: 0 },
});

addMapping(map, {
  generated: { line: 1, column: 9 },
  source: 'input.js',
  original: { line: 1, column: 9 },
  name: 'foo',
});

Where are the @jridgewell/gen-mapping docs?

For the @jridgewell/gen-mapping documentation, it is included in the read-me file of its GitHub page which is located at https://github.com/jridgewell/gen-mapping. The read-me file provides a comprehensive guide on how to use this package, including details for installation, usage, and API details. You'll also find benchmarks showing the package's performance compared to other similar solutions.