![Introducing Enhanced Alert Actions and Triage Functionality](https://cdn.sanity.io/images/cgdhsj6q/production/fe71306d515f85de6139b46745ea7180362324f0-2530x946.png?w=800&fit=max&auto=format)
Product
Introducing Enhanced Alert Actions and Triage Functionality
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
@babel/helpers
Advanced tools
Package description
The @babel/helpers package is part of the Babel toolchain, which is primarily used for converting ECMAScript 2015+ code into a backwards compatible version of JavaScript in current and older browsers or environments. This specific package contains a set of functions that are used by Babel's transform plugins to avoid code duplication across generated output. These helpers are small snippets of code that perform common tasks used by the transformations, such as handling classes, spreading properties, etc.
Class handling
This code demonstrates a helper function used by Babel to ensure that a class is only instantiated with the `new` keyword, preventing incorrect usage.
"use strict";\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nvar MyClass = function MyClass() { _classCallCheck(this, MyClass); };
Spread properties
This helper function is used to emulate the behavior of the object spread operator `{...obj}`, allowing properties from one or more source objects to be copied into a new object.
"use strict";\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nvar obj = _extends({}, sourceObj, { key: 'value' });
Similar to @babel/helpers, core-js is a modular standard library for JavaScript, including polyfills for ECMAScript up to 2021. While @babel/helpers provides functions to support the transformation process, core-js focuses on polyfilling new JavaScript features for older environments.
This package provides runtime support for generators and async functions, similar to how @babel/helpers supports various syntax transformations. It's often used in conjunction with Babel for projects that use generators or async/await syntax to ensure compatibility with older environments.
Changelog
v7.24.0 (2024-02-28)
babel-standalone
babel-core
, babel-helper-create-class-features-plugin
, babel-helpers
, babel-plugin-transform-class-properties
noUninitializedPrivateFieldAccess
assumption (@nicolo-ribaudo)babel-helper-create-class-features-plugin
, babel-helpers
, babel-plugin-proposal-decorators
, babel-plugin-proposal-pipeline-operator
, babel-plugin-syntax-decorators
, babel-plugin-transform-class-properties
, babel-runtime-corejs2
, babel-runtime-corejs3
, babel-runtime
babel-preset-flow
ignoreExtensions
in Flow preset (@nicolo-ribaudo)experimental_useHermesParser
option in preset-flow
(@liuxingbaoyu)babel-helper-import-to-platform-api
, babel-plugin-proposal-import-wasm-source
, babel-plugin-proposal-json-modules
, babel-standalone
babel-plugin-transform-runtime
moduleName
option to @babel/plugin-transform-runtime
(@nicolo-ribaudo)babel-parser
, babel-types
TSImportType
(@sosukesuzuki)babel-plugin-proposal-do-expressions
, babel-traverse
babel-helper-create-class-features-plugin
, babel-plugin-transform-private-methods
, babel-plugin-transform-private-property-in-object
privateFieldsAsSymbols
(@liuxingbaoyu)babel-helper-create-class-features-plugin
, babel-plugin-transform-private-methods
arguments
in private get/set
method (@liuxingbaoyu)babel-helper-create-class-features-plugin
, babel-helpers
, babel-plugin-proposal-decorators
babel-helper-create-class-features-plugin
, babel-plugin-proposal-decorators
static
on decorated private accessor
(@nicolo-ribaudo)babel-helper-create-class-features-plugin
, babel-plugin-proposal-decorators
, babel-plugin-transform-async-generator-functions
, babel-plugin-transform-private-methods
, babel-plugin-transform-private-property-in-object
, babel-plugin-transform-typescript
, babel-preset-env
privateFieldsAsProperties
(@liuxingbaoyu)babel-helpers
arguments
in a helper as a global reference (@nicolo-ribaudo)babel-helpers
, babel-plugin-proposal-decorators
access.get
for public setter decorators (@nicolo-ribaudo)babel-core
, babel-helper-create-class-features-plugin
, babel-preset-env
BABEL_SHOW_CONFIG_FOR
for config problems (@nicolo-ribaudo)babel-helper-transform-fixture-test-runner
output.js
when exec.js
throws (@liuxingbaoyu)babel-helper-create-class-features-plugin
, babel-plugin-proposal-decorators
babel-helper-create-class-features-plugin
, babel-helpers
, babel-plugin-proposal-decorators
, babel-plugin-proposal-pipeline-operator
, babel-plugin-transform-class-properties
babel-helper-create-class-features-plugin
, babel-helpers
, babel-plugin-transform-private-methods
classPrivateMethodGet
(@liuxingbaoyu)babel-helper-create-class-features-plugin
, babel-helpers
, babel-plugin-proposal-decorators
babel-helper-create-class-features-plugin
, babel-plugin-proposal-decorators
, babel-plugin-transform-class-properties
babel-helper-create-class-features-plugin
, babel-helper-fixtures
, babel-helpers
, babel-plugin-bugfix-v8-spread-parameters-in-optional-chaining
, babel-plugin-proposal-decorators
, babel-plugin-proposal-destructuring-private
, babel-plugin-proposal-optional-chaining-assign
, babel-plugin-transform-class-properties
, babel-plugin-transform-class-static-block
, babel-plugin-transform-private-methods
, babel-plugin-transform-private-property-in-object
, babel-preset-env
, babel-runtime-corejs2
, babel-runtime-corejs3
, babel-runtime
babel-helpers
, babel-plugin-proposal-decorators
Readme
Collection of helper functions used by Babel transforms.
See our website @babel/helpers for more information.
Using npm:
npm install --save-dev @babel/helpers
or using yarn:
yarn add @babel/helpers --dev
FAQs
Collection of helper functions used by Babel transforms.
The npm package @babel/helpers receives a total of 33,306,877 weekly downloads. As such, @babel/helpers popularity was classified as popular.
We found that @babel/helpers 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.
Product
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
Security News
Polyfill.io has been serving malware for months via its CDN, after the project's open source maintainer sold the service to a company based in China.
Security News
OpenSSF is warning open source maintainers to stay vigilant against reputation farming on GitHub, where users artificially inflate their status by manipulating interactions on closed issues and PRs.