Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
@babel/helper-call-delegate
Advanced tools
@babel/helper-call-delegate is a Babel helper module that assists in transforming and managing function calls, particularly in the context of handling super calls in derived classes. It is used internally by Babel to ensure that the correct context and arguments are passed when dealing with inheritance and method overriding.
Handling Super Calls
This feature allows you to handle super calls in derived classes by ensuring that the correct context and arguments are passed to the super function. The `callDelegate` function is used to invoke the super function with the specified context and arguments.
const { callDelegate } = require('@babel/helper-call-delegate');
function superCallExample() {
const superFn = () => console.log('super function');
const context = { value: 42 };
const args = [1, 2, 3];
callDelegate(superFn, context, args);
}
superCallExample();
@babel/plugin-transform-classes is a Babel plugin that transforms ES6 class syntax into a backwards-compatible ES5 syntax. It includes functionality for handling super calls and method inheritance, similar to @babel/helper-call-delegate, but as part of a broader transformation of class syntax.
core-js is a modular standard library for JavaScript that includes polyfills for various ECMAScript features, including class inheritance and super calls. While it provides a broader range of polyfills and utilities, it can be used in conjunction with Babel to ensure compatibility with older environments.
babel-plugin-transform-es2015-classes is an older Babel plugin that transforms ES2015 class syntax to ES5. It handles super calls and method inheritance, similar to @babel/helper-call-delegate, but is specific to the ES2015 version of JavaScript.
Helper function to call delegate
See our website @babel/helper-call-delegate for more information.
Using npm:
npm install --save-dev @babel/helper-call-delegate
or using yarn:
yarn add @babel/helper-call-delegate --dev
FAQs
Helper function to call delegate
The npm package @babel/helper-call-delegate receives a total of 288,956 weekly downloads. As such, @babel/helper-call-delegate popularity was classified as popular.
We found that @babel/helper-call-delegate demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 6 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.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.