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-dotall-regex
Advanced tools
Compile regular expressions using the `s` (`dotAll`) flag to ES5.
The @babel/plugin-transform-dotall-regex package is a plugin for Babel, a JavaScript compiler, that transforms regular expressions with the dotAll flag (s flag) to be compatible with environments that do not support this feature. The dotAll flag allows the dot (.) in regular expressions to match any character, including newline characters, which it normally does not match. This plugin ensures that code using the dotAll flag can run in environments that have not implemented this ES2018 feature.
Transformation of dotAll regular expressions
This code demonstrates how a regular expression with the dotAll flag (s flag) is written. The @babel/plugin-transform-dotall-regex plugin would transform this expression into a form that can be executed in JavaScript environments that do not support the dotAll flag, ensuring compatibility.
"use strict";\n\nvar regex = /foo.bar/s;
Similar to @babel/plugin-transform-dotall-regex, this plugin transforms Unicode regular expressions to be compatible with environments that do not support certain Unicode features in regular expressions. While @babel/plugin-transform-dotall-regex focuses on the dotAll flag, @babel/plugin-transform-unicode-regex deals with Unicode property escapes and other Unicode-related transformations.
This package is a part of the regexpu library, which is a collection of tools to process regular expressions. It includes features for transforming ES2015 (ES6) Unicode regular expressions into equivalent ES5 syntax. While it covers a broader range of regular expression features than @babel/plugin-transform-dotall-regex, including the transformation of Unicode property escapes and flags like the dotAll flag, it serves a similar purpose in ensuring compatibility across different JavaScript environments.
Compile regular expressions using the
s
(dotAll
) flag to ES5.
See our website @babel/plugin-transform-dotall-regex for more information.
Using npm:
npm install --save-dev @babel/plugin-transform-dotall-regex
or using yarn:
yarn add @babel/plugin-transform-dotall-regex --dev
v7.25.9 (2024-10-22)
babel-parser
, babel-template
, babel-types
syntacticPlaceholders
mode (@liuxingbaoyu)babel-helper-compilation-targets
, babel-preset-env
ClassAccessorProperty
to prevent the no-undef
rule (@victorenator)babel-parser
, babel-types
VISITOR_KEYS
etc. faster to access (@liuxingbaoyu)FAQs
Compile regular expressions using the `s` (`dotAll`) flag to ES5.
The npm package @babel/plugin-transform-dotall-regex receives a total of 23,192,891 weekly downloads. As such, @babel/plugin-transform-dotall-regex popularity was classified as popular.
We found that @babel/plugin-transform-dotall-regex 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.