![Namecheap Takes Down Polyfill.io Service Following Supply Chain Attack](https://cdn.sanity.io/images/cgdhsj6q/production/6af25114feaaac7179b18127c83327568ff592d1-1024x1024.webp?w=800&fit=max&auto=format)
Security News
Namecheap Takes Down Polyfill.io Service Following Supply Chain Attack
Polyfill.io has been serving malware for months via its CDN, after the project's open source maintainer sold the service to a company based in China.
@volar/source-map
Advanced tools
Changelog
Readme
Provides functionality related to source maps.
This package exports a SourceMap
class with the following methods:
getSourceOffset(generatedOffset: number)
: Returns the source offset for a given generated offset.
getGeneratedOffset(sourceOffset: number)
: Returns the generated offset for a given source offset.
getSourceOffsets(generatedOffset: number)
: Returns all source offsets for a given generated offset.
getGeneratedOffsets(sourceOffset: number)
: Returns all generated offsets for a given source offset.
Mapping
The 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.
FAQs
Provides functionality related to source maps.
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 0 open source maintainers 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.
Security News
Polyfill.io has been serving malware for months via its CDN, after the project's open source maintainer sold the service to a company based in China.
Security News
OpenSSF is warning open source maintainers to stay vigilant against reputation farming on GitHub, where users artificially inflate their status by manipulating interactions on closed issues and PRs.
Security News
A JavaScript library maintainer is under fire after merging a controversial PR to support legacy versions of Node.js.