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/runtime-corejs3
Advanced tools
The @babel/runtime-corejs3 package is a runtime library for Babel that includes polyfills for ECMAScript features using core-js version 3. It is used alongside Babel to enable the use of new JavaScript features in environments that do not natively support them. This package helps to avoid polluting the global scope and reduces the size of the compiled code by deduplicating helper functions.
Polyfilling ECMAScript features
This code imports polyfills for stable ECMAScript features and the regenerator runtime needed to use generators and async functions.
import 'core-js/stable';
import 'regenerator-runtime/runtime';
Usage of built-in methods
This code demonstrates how to use the map method from core-js through the runtime without polluting the global Array prototype.
import { map } from '@babel/runtime-corejs3/core-js-stable/instance/map';
let arr = [1, 2, 3];
let mapped = map.call(arr, x => x * x);
Usage of new syntax features
This code shows how to use the helpers provided by @babel/runtime-corejs3 to work with new syntax features like async functions and generators.
import _asyncToGenerator from '@babel/runtime-corejs3/helpers/asyncToGenerator';
import _regeneratorRuntime from '@babel/runtime-corejs3/regenerator';
const asyncFunc = _asyncToGenerator(function* () {
yield Promise.resolve('Hello World');
});
core-js is a modular standard library for JavaScript, including polyfills for ECMAScript up to 2021. It's similar to @babel/runtime-corejs3 but does not require Babel to work and can be included directly in any JavaScript project.
regenerator-runtime is a standalone runtime for Regenerator-compiled generator and async functions. It is similar to the regenerator part of @babel/runtime-corejs3 but does not include other polyfills or helpers.
Deprecated in favor of separate core-js and regenerator-runtime packages, @babel/polyfill was a package that included Babel's polyfills for ECMAScript features. It was similar to @babel/runtime-corejs3 but was designed to be included globally rather than modularly.
babel's modular runtime helpers with core-js@3 polyfilling
See our website @babel/runtime-corejs3 for more information.
Using npm:
npm install --save @babel/runtime-corejs3
or using yarn:
yarn add @babel/runtime-corejs3
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
babel's modular runtime helpers with core-js@3 polyfilling
The npm package @babel/runtime-corejs3 receives a total of 6,391,983 weekly downloads. As such, @babel/runtime-corejs3 popularity was classified as popular.
We found that @babel/runtime-corejs3 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.