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

@volar/source-map

Package Overview
Dependencies
Maintainers
1
Versions
397
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@volar/source-map - npm Package Compare versions

Comparing version 2.4.10 to 2.4.11

4

package.json
{
"name": "@volar/source-map",
"version": "2.4.10",
"version": "2.4.11",
"license": "MIT",

@@ -14,3 +14,3 @@ "files": [

},
"gitHead": "03d1e8b07e1e64921b76b635c7064d7b4fcf63b5"
"gitHead": "42ccae005cc8516e07ad38f4d7730cab9b723340"
}

@@ -7,12 +7,19 @@ # @volar/source-map

This package exports a `SourceMap` class with the following methods:
### This package exports a `SourceMap` class with the following methods:
- `getSourceOffset(generatedOffset: number)`: Returns the source offset for a given generated offset.
Params:
- `getGeneratedOffset(sourceOffset: number)`: Returns the generated offset for a given source offset.
- `fallbackToAnyMatch`(default: false): allow the start and end offsets to come from different mappings.
- `filter?: (data: Data) => boolean)`(default: undefined): according to mapping: Mapping<MyDataType>.data, filter out offsets that do not meet the custom conditions.
- `getSourceOffsets(generatedOffset: number)`: Returns all source offsets for a given generated offset.
Methods:
- `getGeneratedOffsets(sourceOffset: number)`: Returns all generated offsets for a given source offset.
- `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.
## Data Structures

@@ -19,0 +26,0 @@

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