You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 7-8.RSVP
Socket
Socket
Sign inDemoInstall

@babel/runtime-corejs3

Package Overview
Dependencies
Maintainers
4
Versions
131
Alerts
File Explorer

Advanced tools

Socket logo

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
7M
decreased by-0.78%
Maintainers
4
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

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

Package last updated on 26 Jul 2024

Did you know?

Socket

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
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc