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/runtime
Advanced tools
Package description
The @babel/runtime package is a library that includes Babel modular runtime helpers and a version of regenerator-runtime. It is used to avoid polluting the global scope and to reduce the size of the compiled output by deduplicating helper functions that are commonly used by Babel-transpiled code. It is particularly useful when building libraries or applications that need to be optimized for size and scope isolation.
Modularized Helpers
This feature allows you to use Babel's helper functions in a modular way, without including them in every file that needs them, thus reducing redundancy and file size.
import _classCallCheck from '@babel/runtime/helpers/classCallCheck';
class MyClass {
constructor() {
_classCallCheck(this, MyClass);
// class body
}
}
Regenerator Runtime
Includes a version of the regenerator runtime to enable the use of async/await and generator functions in environments that do not natively support them.
import 'regenerator-runtime/runtime';
async function asyncCall() {
await someAsyncFunction();
}
Similar to @babel/runtime, core-js is a modular standard library for JavaScript, which includes polyfills for ECMAScript features. It is often used in conjunction with Babel to ensure that newer language features will work in older environments. It is more comprehensive than @babel/runtime but can lead to larger bundle sizes if not used carefully.
tslib is a runtime library for TypeScript that includes helper functions similar to those in @babel/runtime. It is used to support features from TypeScript such as async/await, spread operators, and others without duplicating code. It is specific to TypeScript, whereas @babel/runtime is used with Babel and can be used with JavaScript or TypeScript.
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
babel's modular runtime helpers
See our website @babel/runtime for more information.
Using npm:
npm install --save @babel/runtime
or using yarn:
yarn add @babel/runtime
FAQs
babel's modular runtime helpers
We found that @babel/runtime 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.