Babel (transcompiler)

From HandWiki - Reading time: 3 min

Short description: Backwards compatible JavaScript compiler
Babel
Babel Logo
Original author(s)Sebastian McKenzie
Developer(s)Contributors
Initial releaseSeptember 28, 2014; 9 years ago (2014-09-28)[1]
Stable release
7.13.14 / March 29, 2021; 3 years ago (2021-03-29)[2]
Written inJavaScript
Operating systemLinux, macOS, Solaris, FreeBSD, OpenBSD, AIX, Microsoft Windows
TypeCompiler
LicenseMIT[3]
Websitebabeljs.io

Babel is a free and open-source JavaScript transcompiler that is mainly used to convert ECMAScript 2015+ (ES6+) code into backwards-compatible JavaScript code that can be run by older JavaScript engines. It allows web developers to take advantage of the newest features of the language.[4]

Developers can use new JavaScript language features by using Babel to convert their source code into versions of JavaScript that a Web browser can process.[5] Babel is used to compile TypeScript into JavaScript.[6] The core version of Babel was downloaded 5 million times a month in 2016, and this increased to 16 million times a week in 2019.[7][8]

Babel plugins transform syntax that is not widely supported into a backward-compatible version. For example, arrow functions, which are specified in ES6, are converted into regular function declarations.[9] Non-standard JavaScript syntax such as JSX can also be transformed.[10][11]

Babel can automatically inject polyfills provided by core-js[12] for support features that are missing entirely from JavaScript environments. For example, static methods such as Array.from and built-ins such as Promise are available only in ES6 and above, but they can be used in older environments if core-js is used.

See also

References

External links




Licensed under CC BY-SA 3.0 | Source: https://handwiki.org/wiki/Software:Babel_(transcompiler)
2 views | Status: cached on August 26 2024 14:25:18
↧ Download this article as ZWI file
Encyclosphere.org EncycloReader is supported by the EncyclosphereKSF