
Research
/Security News
Fake imToken Chrome Extension Steals Seed Phrases via Phishing Redirects
Mixed-script homoglyphs and a lookalike domain mimic imToken’s import flow to capture mnemonics and private keys.
@volar/source-map
Advanced tools
Provides functionality related to source maps.
SourceMap class with the following methods:Params:
fallbackToAnyMatch(default: false): allow the start and end offsets to come from different mappings.filter?: (data: Data) => boolean)(default: undefined): according to mapping: Mapping.data, filter out offsets that do not meet the custom conditions.Methods:
toSourceRange(generatedStart: number, generatedEnd: number, fallbackToAnyMatch: boolean, filter?: (data: Data) => boolean): Returns all source start and end offsets for the given generated start and end offsets.
toGeneratedRange(sourceStart: number, sourceEnd: number, fallbackToAnyMatch: boolean, filter?: (data: Data) => boolean) : Returns all generated start and end offsets for the given source start and end offsets.
toSourceLocation(generatedOffset: number, filter?: (data: Data) => boolean): Returns all source offsets for a given generated offset.
toGeneratedLocation(sourceOffset: number, filter?: (data: Data) => boolean): Returns all generated offsets for a given source offset.
MappingThe Mapping is a tuple that represents a mapping in the source map. It consists of the following elements:
source: A string representing the source file. This can be undefined.sourceOffsets: Offsets in the source code.generatedOffsets: Offsets in the generated code.data: The data associated with this mapping. The type of this data is generic and can be specified when creating a SourceMap instance.Here is an example of a Mapping:
let mapping: Mapping<MyDataType> = {
source: '.../sourceFile.ts',
sourceOffsets: [10],
generatedOffsets: [30],
lengths: [10],
data: myData,
};
In this example, myData is of type MyDataType, which is the type specified for the SourceMap instance.
Remember to replace MyDataType and myData with actual types and data that are relevant to your project.
This project is licensed under the MIT License. See the LICENSE file for more details.
The 'source-map' package is a widely-used library for generating and consuming source maps. It provides similar functionalities to @volar/source-map, such as creating, parsing, and combining source maps. However, 'source-map' is more established and has a larger user base.
The 'source-map-support' package provides source map support for stack traces in node.js. While it also deals with source maps, its primary focus is on enhancing error stack traces with source map information, making it slightly different in scope compared to @volar/source-map.
Webpack is a module bundler that includes built-in support for source maps. While it is not solely focused on source maps, it provides extensive functionalities for generating and managing source maps as part of its bundling process. It is more comprehensive and complex compared to @volar/source-map.
FAQs
Provides functionality related to source maps.
The npm package @volar/source-map receives a total of 5,968,006 weekly downloads. As such, @volar/source-map popularity was classified as popular.
We found that @volar/source-map demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

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.

Research
/Security News
Mixed-script homoglyphs and a lookalike domain mimic imToken’s import flow to capture mnemonics and private keys.

Security News
Latio’s 2026 report recognizes Socket as a Supply Chain Innovator and highlights our work in 0-day malware detection, SCA, and auto-patching.

Company News
Join Socket for live demos, rooftop happy hours, and one-on-one meetings during BSidesSF and RSA 2026 in San Francisco.