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.
@babel/plugin-transform-function-name
Advanced tools
Apply ES2015 function.name semantics to all functions
The @babel/plugin-transform-function-name package is a plugin for Babel, a JavaScript compiler, that helps in transforming anonymous function expressions into named function expressions. This can be particularly useful for debugging purposes, as it makes stack traces more informative by providing names for otherwise anonymous functions.
Naming anonymous function expressions
Automatically assigns names to anonymous function expressions, making them easier to identify in stack traces and debugging tools.
const square = function(x) { return x * x; }; // Transforms to: const square = function square(x) { return x * x; };
Enhancing debugging
Improves the debugging experience by ensuring that functions are named, which helps in identifying them in call stacks.
let add = function(a, b) { return a + b; }; // Transforms to: let add = function add(a, b) { return a + b; };
Transforms ES2015 arrow functions into function expressions. Similar in that it transforms function syntax for broader compatibility and improved debugging, but focuses on arrow functions instead of naming functions.
Transforms default parameters and rest parameters in functions to ES5. It's similar because it also deals with transforming aspects of functions for compatibility and optimization, but it focuses on parameters rather than naming.
Apply ES2015 function.name semantics to all functions
See our website @babel/plugin-transform-function-name for more information.
Using npm:
npm install --save-dev @babel/plugin-transform-function-name
or using yarn:
yarn add @babel/plugin-transform-function-name --dev
v7.25.7 (2024-10-02)
babel-helper-validator-identifier
babel-traverse
babel-plugin-transform-classes
super()
check (@nicolo-ribaudo)babel-generator
infer
in compact mode (@nicolo-ribaudo)[no LineTerminator here]
after nodes (@nicolo-ribaudo)babel-types
babel-core
--experimental-require-module
(@nicolo-ribaudo)babel-helper-compilation-targets
, babel-helper-plugin-utils
, babel-preset-env
babel-plugin-proposal-destructuring-private
, babel-plugin-syntax-decimal
, babel-plugin-syntax-import-reflection
, babel-standalone
babel-generator
[no LineTerminator here]
before nodes (@nicolo-ribaudo)babel-plugin-transform-typescript
babel-types
BABEL_TYPES_8_BREAKING
at startup (@nicolo-ribaudo)FAQs
Apply ES2015 function.name semantics to all functions
The npm package @babel/plugin-transform-function-name receives a total of 20,389,727 weekly downloads. As such, @babel/plugin-transform-function-name popularity was classified as popular.
We found that @babel/plugin-transform-function-name demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 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.
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.