You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

@jridgewell/sourcemap-codec

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@jridgewell/sourcemap-codec

Encode/decode sourcemap mappings

1.5.3
Source
npmnpm
Version published
Weekly downloads
71M
-2.06%
Maintainers
1
Weekly downloads
 
Created

What is @jridgewell/sourcemap-codec?

The @jridgewell/sourcemap-codec npm package is a library designed to encode and decode the mappings of a source map, which is a data format that provides a way to associate the original source code with the generated code. This is particularly useful for debugging minified code or transpiled code in a browser's developer tools.

What are @jridgewell/sourcemap-codec's main functionalities?

Encoding source map mappings

This feature allows you to encode an array of source map mappings into a compact string representation, which can be used in a source map file.

const { encode } = require('@jridgewell/sourcemap-codec');
const mappings = [
  [1, 2, 3, 4, 5],
  [0, 0, 0, 0, 0],
  [1, 2, 3, 4, 5, 6]
];
const encodedMappings = encode(mappings);

Decoding source map mappings

This feature allows you to decode a string representation of source map mappings back into an array format, which can be manipulated or inspected in JavaScript.

const { decode } = require('@jridgewell/sourcemap-codec');
const encodedMappings = 'AAAA,CAAC,CAAC,EAAE,CAAC;';
const decodedMappings = decode(encodedMappings);

Other packages similar to @jridgewell/sourcemap-codec

Keywords

sourcemap

FAQs

Package last updated on 30 Jun 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts