Socket
Socket
Sign inDemoInstall

@babel/runtime-corejs3

Package Overview
Dependencies
2
Maintainers
4
Versions
122
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

@babel/runtime-corejs3

babel's modular runtime helpers with core-js@3 polyfilling


Version published
Maintainers
4
Weekly downloads
7,016,690
increased by3.17%

Weekly downloads

Package description

What is @babel/runtime-corejs3?

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.

What are @babel/runtime-corejs3's main functionalities?

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');
});

Other packages similar to @babel/runtime-corejs3

Changelog

Source

v7.24.4 (2024-04-03)

:eyeglasses: Spec Compliance
  • babel-parser
    • #16403 Forbid initializerless using (@JLHwung)
  • babel-helpers, babel-plugin-proposal-decorators, babel-runtime-corejs3
:bug: Bug Fix
  • babel-generator
  • babel-compat-data, babel-plugin-bugfix-firefox-class-in-computed-class-key, babel-preset-env
  • babel-helper-create-class-features-plugin, babel-plugin-proposal-decorators
  • babel-plugin-transform-block-scoping
  • babel-core, babel-plugin-transform-block-scoped-functions, babel-plugin-transform-block-scoping

Readme

Source

@babel/runtime-corejs3

babel's modular runtime helpers with core-js@3 polyfilling

See our website @babel/runtime-corejs3 for more information.

Install

Using npm:

npm install --save @babel/runtime-corejs3

or using yarn:

yarn add @babel/runtime-corejs3

FAQs

Last updated on 03 Apr 2024

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc