
Product
Announcing Socket Fix 2.0
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
as-debug-transform
Advanced tools
A simple conditional compilation library for testing or debugging.
npm install --save-dev as-debug-transform
Update your asconfig to include the transform:
{
"options": {
... // other options here
"transform": ["as-debug-transform"]
}
}
@debugMode
decorator is used to decorate functions/methods/static methods. Its usage is as simple as @inline/@global
.
When a function is decorated, its body will be erased if you want to compile production code.
You can use it in the following ways:
DEBUG_MODE
. Transform will always erase function bodies.DEBUG_MODE
to false
or 0
. Transform will always keep function bodies.DEBUG_MODE
to debug
. Transform will keep function bodies when optimizeLevel
< 2.Now, debugMode
only support MethodDeclaration
and FunctionDeclaration
. Maybe support for classes/namespaces/fields and more features may be added in the future, but it is practical enough for now.
FAQs
A debug decorator which erase function body for AssemblyScript
We found that as-debug-transform 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 Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
Security News
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.
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.