Security News
New Proposed CISA Mandate Would Require Critical Infrastructure to Report Ransom Payments Within 24 Hours
CISA has proposed a set of new rules that would require critical infrastructure to report cyber incidents and ransom payments.
@babel/core
Advanced tools
Babel compiler core.
Weekly downloads
Package description
@babel/core is the core library of the Babel JavaScript compiler. It is primarily used for transforming ES6+ code into backwards compatible JavaScript that can be run by older JavaScript engines. Babel is widely used for its ability to transpile new JavaScript syntax, JSX, TypeScript, and for its plugin system that allows developers to use experimental features and customize the build process.
Syntax Transformation
Transforms modern JavaScript syntax into a backwards compatible version. For example, it can convert ES6 arrow functions into regular ES5 functions.
require('@babel/core').transform('code', { presets: ['@babel/preset-env'] });
Plugin/Preset Application
Applies Babel plugins or presets to the code to enable specific transformations or sets of transformations.
require('@babel/core').transform('code', { plugins: ['@babel/plugin-transform-arrow-functions'] });
Source Map Generation
Generates source maps which help in debugging the original source code after it has been transformed by Babel.
require('@babel/core').transform('code', { sourceMaps: true });
Code Generation
Generates code from an Abstract Syntax Tree (AST). This is useful when you want to transform the AST directly or manipulate it before generating code.
require('@babel/core').transformFromAst(ast, 'code', { presets: ['@babel/preset-env'] });
TypeScript is a superset of JavaScript that compiles to plain JavaScript. It offers type checking and is aimed at the development of large applications. While it does transpile code, it is more focused on type safety and less on new syntax features.
Traceur is a JavaScript.next-to-JavaScript-of-today compiler that allows you to use features from the future today. Traceur supports a subset of the ES6 specification and comes with its own module loader. It is not as widely adopted or as flexible as Babel.
esbuild is an extremely fast JavaScript bundler and minifier. It also provides a limited set of transformation features, such as JSX and TypeScript support. It is not as extensible as Babel but is focused on speed and efficiency.
swc is a super-fast compiler written in Rust that aims to be a drop-in replacement for Babel. It supports most of the modern JavaScript features and is focused on performance. It is gaining popularity in the JavaScript community for its speed.
Changelog
v7.19.0 (2022-09-05)
babel-parser
babel-helpers
, babel-plugin-proposal-async-generator-functions
, babel-preset-env
, babel-runtime-corejs2
, babel-runtime-corejs3
, babel-runtime
babel-generator
, babel-helpers
, babel-parser
, babel-plugin-proposal-decorators
, babel-plugin-syntax-decorators
, babel-runtime-corejs2
, babel-runtime-corejs3
, babel-runtime
babel-parser
decoratorsBeforeExport
default to false
(@nicolo-ribaudo)babel-generator
, babel-parser
babel-standalone
babel-helper-create-regexp-features-plugin
, babel-helpers
, babel-plugin-proposal-duplicate-named-capturing-groups-regex
, babel-plugin-transform-named-capturing-groups-regex
, babel-standalone
babel-helper-function-name
, babel-helper-wrap-function
, babel-plugin-transform-classes
babel-plugin-transform-typescript
#privateField!
(@liuxingbaoyu)babel-parser
babel-helper-builder-react-jsx
babel-core
@babel/core
functions in config errors (@nicolo-ribaudo)Readme
Babel compiler core.
See our website @babel/core for more information or the issues associated with this package.
Using npm:
npm install --save-dev @babel/core
or using yarn:
yarn add @babel/core --dev
FAQs
Babel compiler core.
The npm package @babel/core receives a total of 38,956,975 weekly downloads. As such, @babel/core popularity was classified as popular.
We found that @babel/core 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.
Security News
CISA has proposed a set of new rules that would require critical infrastructure to report cyber incidents and ransom payments.
Security News
Redis is no longer OSS, breaking its explicit commitment to remain under the BSD 3-Clause License forever. This has angered contributors who are now working to fork the software.
Product
Socket AI now enables 'AI detected potential malware' alerts by default, ensuring users benefit from AI-powered state-of-the-art malware detection without needing to opt-in.