
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
babel-plugin-transform-iife-for-debug
Advanced tools
> Turn arrow function with debuge comment into IIFE
Turn arrow function with debuge comment into IIFE
See our website @babel/plugin-transform-iife-for-debug for more information.
Using npm:
npm install --save-dev @babel/plugin-transform-iife-for-debug
or using yarn:
yarn add @babel/plugin-transform-iife-for-debug --dev
// .babelrc
{
"plugins": [
["transform-iife-for-debug"]
// with options:
// ["transform-iife-for-debug", {"targetFlag": "@IIFE-for-debug", ...}]
]
}
Source Code:
let normalNum = 1 + 2;
// @IIFE-for-debug
() => {
normalNum = 10
}
let normalResult = normalNum * 10;
After Transforming(development)
let normalNum = 1 + 2;
// [IIFE]
// @IIFE-for-debug
(() => {
normalNum = 10
})()
let normalResult = normalNum * 10;
After Transforming(not development)
let normalNum = 1 + 2;
// [removed]
// @IIFE-for-debug
let normalResult = normalNum * 10;
Default
{
targetFlag: '@IIFE-for-debug',
enableCondition: () => true,
transformCondition: () => process.env.NODE_ENV==='development'
}
FAQs
> Automatically execute debug code in the development environment without affecting production code. > > 在不会影响到生产代码的前提下,在开发环境对调试代码进行自动执行。
We found that babel-plugin-transform-iife-for-debug 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.
Security News
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.