
Product
Introducing Tier 1 Reachability: Precision CVE Triage for Enterprise Teams
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.
babel-plugin-transform-class-prototype-name
Advanced tools
Manaully sets a classes prototype.name after each definition
After the creation of each class, the plugin manually sets the prototype.name to the class name. This means that after minification class errors still report correctly if you dont have source maps enabled.
$ npm install babel-plugin-class-prototype-name
.babelrc
(Recommended).babelrc
{
"plugins": ["class-prototype-name"]
}
$ babel --plugins class-prototype-name script.js
require("babel-core").transform("code", {
plugins: ["class-prototype-name"]
});
class CustomError extends Error {}
class CustomError extends Error {}
CustomError.prototype.name = "CustomError";
class a extends Error {}
a.prototype.name = "CustomError";
FAQs
Manaully sets a classes prototype.name after each definition
We found that babel-plugin-transform-class-prototype-name 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.
Product
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.
Research
/Security News
Ongoing npm supply chain attack spreads to DuckDB: multiple packages compromised with the same wallet-drainer malware.
Security News
The MCP Steering Committee has launched the official MCP Registry in preview, a central hub for discovering and publishing MCP servers.