Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@jridgewell/sourcemap-codec

Package Overview
Dependencies
Maintainers
1
Versions
9
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.4.12
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
69M
decreased by-26.63%
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

FAQs

Package last updated on 02 May 2022

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc