Research
Security News
Threat Actor Exposes Playbook for Exploiting npm to Build Blockchain-Powered Botnets
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
@types/source-map-support
Advanced tools
@types/source-map-support provides TypeScript type definitions for the source-map-support package, which is used to enhance the debugging experience by providing better stack traces with source maps.
Install Source Map Support
This feature allows you to install source map support in your Node.js application, enabling better stack traces that map to the original source code.
const sourceMapSupport = require('source-map-support');
sourceMapSupport.install();
Uninstall Source Map Support
This feature allows you to uninstall source map support, reverting to the default stack trace behavior.
const sourceMapSupport = require('source-map-support');
sourceMapSupport.uninstall();
Customizing Source Map Retrieval
This feature allows you to customize how source maps are retrieved, providing a function that returns the source map for a given source file.
const sourceMapSupport = require('source-map-support');
sourceMapSupport.install({
retrieveSourceMap: function(source) {
if (source === 'compiled.js') {
return {
url: 'compiled.js',
map: fs.readFileSync('compiled.js.map', 'utf8')
};
}
return null;
}
});
The source-map package provides a library for working with source maps, including parsing and generating them. Unlike source-map-support, it does not automatically enhance stack traces but provides the tools to work with source maps directly.
stacktrace-js is a library for generating, parsing, and enhancing JavaScript stack traces. It provides more general stack trace manipulation capabilities compared to source-map-support, which focuses specifically on source maps.
error-stack-parser is a library for parsing error stack traces into a more readable format. While it does not directly deal with source maps, it can be used in conjunction with source-map-support to improve error handling and debugging.
npm install --save @types/source-map-support
This package contains type definitions for source-map-support ( https://github.com/evanw/node-source-map-support ).
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/source-map-support
Additional Details
These definitions were written by Bart van der Schoor https://github.com/Bartvds, Jason Cheatham https://github.com/jason0x43.
FAQs
TypeScript definitions for source-map-support
The npm package @types/source-map-support receives a total of 315,032 weekly downloads. As such, @types/source-map-support popularity was classified as popular.
We found that @types/source-map-support demonstrated a not healthy version release cadence and project activity because the last version was released 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
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
Security News
NVD’s backlog surpasses 20,000 CVEs as analysis slows and NIST announces new system updates to address ongoing delays.
Security News
Research
A malicious npm package disguised as a WhatsApp client is exploiting authentication flows with a remote kill switch to exfiltrate data and destroy files.