Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
@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 14,111,809 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
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.