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
Weekly downloads
6.1M
decreased by-13.18%
Maintainers
4
Install size
1.13 MB
Created
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.18.9 (2022-07-18)

:bug: Bug Fix
  • babel-plugin-transform-modules-systemjs, babel-types
    • #14763 fix: allow exporting TSDeclareFunction as default (@zxbodya)
  • babel-generator
:nail_care: Polish
:house: Internal
  • babel-core, babel-helper-remap-async-to-generator, babel-helpers, babel-parser, babel-plugin-transform-block-scoping, babel-preset-env
  • babel-helper-create-class-features-plugin, babel-helper-member-expression-to-functions, babel-helper-remap-async-to-generator, babel-helper-replace-supers, babel-helper-wrap-function, babel-helpers, babel-plugin-bugfix-v8-spread-parameters-in-optional-chaining, babel-plugin-proposal-decorators, babel-plugin-proposal-object-rest-spread, babel-plugin-proposal-optional-chaining, babel-plugin-transform-block-scoping, babel-plugin-transform-classes, babel-traverse, babel-types
:running_woman: Performance

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 18 Jul 2022

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