Research
Security News
Threat Actor Exposes Playbook for Exploiting npm to Build Blockchain-Powered Botnets
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
@babel/plugin-transform-exponentiation-operator
Advanced tools
Compile exponentiation operator to ES5
The @babel/plugin-transform-exponentiation-operator package is a plugin for Babel, a JavaScript compiler, that allows developers to use the exponentiation operator (**) in their JavaScript code. This operator is used to raise the first operand to the power of the second operand. The plugin transforms this syntax into a format that is compatible with environments that do not support the exponentiation operator natively.
Exponentiation Operator Transformation
This feature allows developers to write code using the exponentiation operator (**) for performing exponentiation operations. The plugin then transforms this syntax into a call to Math.pow, ensuring compatibility with older JavaScript environments.
"use strict";\n\nvar _Mathpow = Math.pow;\n\nvar a = 2;\nvar b = 3;\nvar c = _Mathpow(a, b); // Transforms a ** b into Math.pow(a, b)
Similar to @babel/plugin-transform-exponentiation-operator, this package transforms modern JavaScript syntax (arrow functions in this case) into a form that is compatible with older JavaScript environments. While it focuses on arrow functions instead of the exponentiation operator, the goal of ensuring code compatibility across different environments is shared.
This package transforms template literals into a string concatenation format, ensuring compatibility with environments that do not support template literals. Like @babel/plugin-transform-exponentiation-operator, it aims to make modern JavaScript syntax accessible in older environments, though it focuses on template literals instead of exponentiation.
Compile exponentiation operator to ES5
See our website @babel/plugin-transform-exponentiation-operator for more information.
Using npm:
npm install --save-dev @babel/plugin-transform-exponentiation-operator
or using yarn:
yarn add @babel/plugin-transform-exponentiation-operator --dev
v7.16.5 (2021-12-13)
babel-cli
, babel-core
, babel-helpers
, babel-plugin-proposal-class-properties
, babel-plugin-proposal-decorators
, babel-plugin-transform-classes
, babel-plugin-transform-jscript
, babel-plugin-transform-parameters
, babel-plugin-transform-runtime
, babel-plugin-transform-spread
, babel-plugin-transform-typescript
, babel-preset-env
babel-plugin-transform-parameters
babel-plugin-transform-arrow-functions
, babel-traverse
arguments
variables from functions (@The-x-Theorist)babel-parser
babel-traverse
babel-generator
babel-plugin-transform-react-jsx
babel-helper-create-class-features-plugin
, babel-helper-environment-visitor
, babel-helper-member-expression-to-functions
, babel-helper-module-transforms
, babel-helper-replace-supers
, babel-plugin-transform-classes
, babel-traverse
this
&co in computed keys in arrows transform (@nicolo-ribaudo)babel-parser
babel-compat-data
, babel-helper-annotate-as-pure
, babel-helper-builder-binary-assignment-operator-visitor
, babel-helper-builder-react-jsx
, babel-helper-compilation-targets
, babel-helper-create-class-features-plugin
, babel-helper-create-regexp-features-plugin
, babel-helper-define-map
, babel-helper-explode-assignable-expression
, babel-helper-fixtures
, babel-helper-function-name
, babel-helper-get-function-arity
, babel-helper-hoist-variables
, babel-helper-member-expression-to-functions
, babel-helper-module-imports
, babel-helper-module-transforms
, babel-helper-optimise-call-expression
, babel-helper-plugin-test-runner
, babel-helper-plugin-utils
, babel-helper-remap-async-to-generator
, babel-helper-replace-supers
, babel-helper-simple-access
, babel-helper-skip-transparent-expression-wrappers
, babel-helper-split-export-declaration
, babel-helper-transform-fixture-test-runner
, babel-helper-validator-identifier
, babel-helper-validator-option
, babel-helper-wrap-function
, babel-plugin-bugfix-safari-id-destructuring-collision-in-function-expression
, babel-plugin-bugfix-v8-spread-parameters-in-optional-chaining
, babel-plugin-proposal-async-do-expressions
, babel-plugin-proposal-record-and-tuple
, babel-plugin-syntax-async-do-expressions
, babel-plugin-syntax-module-blocks
, babel-plugin-transform-react-jsx-development
, babel-plugin-transform-react-pure-annotations
, babel-runtime-corejs2
, babel-runtime-corejs3
, babel-runtime
babel-cli
, babel-code-frame
, babel-core
, babel-generator
, babel-helper-annotate-as-pure
, babel-helper-compilation-targets
, babel-helper-create-class-features-plugin
, babel-helper-create-regexp-features-plugin
, babel-helper-fixtures
, babel-helper-module-imports
, babel-helper-optimise-call-expression
, babel-helper-plugin-test-runner
, babel-helper-transform-fixture-test-runner
, babel-helper-validator-identifier
, babel-helper-validator-option
, babel-helpers
, babel-highlight
, babel-node
, babel-parser
, babel-plugin-bugfix-safari-id-destructuring-collision-in-function-expression
, babel-plugin-bugfix-v8-spread-parameters-in-optional-chaining
, babel-plugin-external-helpers
, babel-plugin-proposal-async-do-expressions
, babel-plugin-proposal-async-generator-functions
, babel-plugin-proposal-class-properties
, babel-plugin-proposal-class-static-block
, babel-plugin-proposal-decorators
, babel-plugin-proposal-do-expressions
, babel-plugin-proposal-dynamic-import
, babel-plugin-proposal-export-default-from
, babel-plugin-proposal-export-namespace-from
, babel-plugin-proposal-function-bind
, babel-plugin-proposal-function-sent
, babel-plugin-proposal-json-strings
, babel-plugin-proposal-logical-assignment-operators
, babel-plugin-proposal-nullish-coalescing-operator
, babel-plugin-proposal-numeric-separator
, babel-plugin-proposal-object-rest-spread
, babel-plugin-proposal-optional-catch-binding
, babel-plugin-proposal-optional-chaining
, babel-plugin-proposal-partial-application
, babel-plugin-proposal-pipeline-operator
, babel-plugin-proposal-private-methods
, babel-plugin-proposal-private-property-in-object
, babel-plugin-proposal-record-and-tuple
, babel-plugin-proposal-throw-expressions
, babel-plugin-proposal-unicode-property-regex
, babel-plugin-syntax-decorators
, babel-plugin-syntax-typescript
, babel-plugin-transform-arrow-functions
, babel-plugin-transform-async-to-generator
, babel-plugin-transform-block-scoped-functions
, babel-plugin-transform-block-scoping
, babel-plugin-transform-classes
, babel-plugin-transform-computed-properties
, babel-plugin-transform-destructuring
, babel-plugin-transform-dotall-regex
, babel-plugin-transform-duplicate-keys
, babel-plugin-transform-exponentiation-operator
, babel-plugin-transform-flow-comments
, babel-plugin-transform-flow-strip-types
, babel-plugin-transform-for-of
, babel-plugin-transform-function-name
, babel-plugin-transform-instanceof
, babel-plugin-transform-jscript
, babel-plugin-transform-member-expression-literals
, babel-plugin-transform-modules-amd
, babel-plugin-transform-modules-commonjs
, babel-plugin-transform-modules-systemjs
, babel-plugin-transform-modules-umd
, babel-plugin-transform-named-capturing-groups-regex
, babel-plugin-transform-new-target
, babel-plugin-transform-object-super
, babel-plugin-transform-parameters
, babel-plugin-transform-property-literals
, babel-plugin-transform-property-mutators
, babel-plugin-transform-proto-to-assign
, babel-plugin-transform-react-constant-elements
, babel-plugin-transform-react-display-name
, babel-plugin-transform-react-inline-elements
, babel-plugin-transform-react-jsx-compat
, babel-plugin-transform-react-jsx-development
, babel-plugin-transform-react-jsx-self
, babel-plugin-transform-react-jsx-source
, babel-plugin-transform-react-jsx
, babel-plugin-transform-react-pure-annotations
, babel-plugin-transform-regenerator
, babel-plugin-transform-reserved-words
, babel-plugin-transform-runtime
, babel-plugin-transform-shorthand-properties
, babel-plugin-transform-spread
, babel-plugin-transform-sticky-regex
, babel-plugin-transform-strict-mode
, babel-plugin-transform-template-literals
, babel-plugin-transform-typeof-symbol
, babel-plugin-transform-typescript
, babel-plugin-transform-unicode-escapes
, babel-plugin-transform-unicode-regex
, babel-preset-env
, babel-preset-flow
, babel-preset-react
, babel-preset-typescript
, babel-register
, babel-standalone
, babel-template
, babel-traverse
, babel-types
babel-parser
babel-helpers
require
d files in @babel/helpers
tests (@nicolo-ribaudo)babel-plugin-proposal-object-rest-spread
, babel-traverse
babel-parser
, babel-plugin-bugfix-safari-id-destructuring-collision-in-function-expression
, babel-plugin-bugfix-v8-spread-parameters-in-optional-chaining
, babel-plugin-proposal-optional-chaining
, babel-preset-react
, babel-preset-typescript
src
in tests (@nicolo-ribaudo)@babel/runtime
ESM tests fail (@nicolo-ribaudo)babel-helpers
, babel-plugin-proposal-async-generator-functions
, babel-plugin-transform-runtime
, babel-preset-env
, babel-runtime-corejs2
, babel-runtime
helpers-generated.ts
(@lightmare)FAQs
Compile exponentiation operator to ES5
The npm package @babel/plugin-transform-exponentiation-operator receives a total of 21,028,774 weekly downloads. As such, @babel/plugin-transform-exponentiation-operator popularity was classified as popular.
We found that @babel/plugin-transform-exponentiation-operator 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.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
Security News
NVD’s backlog surpasses 20,000 CVEs as analysis slows and NIST announces new system updates to address ongoing delays.
Security News
Research
A malicious npm package disguised as a WhatsApp client is exploiting authentication flows with a remote kill switch to exfiltrate data and destroy files.