Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
@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
FAQs
Compile regular expressions using the `s` (`dotAll`) flag to ES5.
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.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.