
Security News
Meet Socket at Black Hat Europe and BSides London 2025
Socket is heading to London! Stop by our booth or schedule a meeting to see what we've been working on.
@putout/operator-regexp
Advanced tools
đPutout operator adds ability to check if provided regexp can be converted to string without losing it's sense
đPutout operator adds ability to determine that provided RegExp can be
converted to String without losing it's sense.
It is used for example in regexp/convert-replace-to-relace-all:
-'hello'.replace(/hello/g, 'world');
+'hello'.replaceAll('hello', 'world');
npm i putout @putout/operator-regexp
const {operator} = require('putout');
const {isSimpleRegExp} = operator;
isSimpleRegExp(/hello world/);
// returns
true;
isSimpleRegExp(/^hello/);
// returns
false;
transformRegExp('[aab]', {
report,
fix,
traverse,
});
MIT
FAQs
đPutout operator adds ability to check if provided regexp can be converted to string without losing it's sense
The npm package @putout/operator-regexp receives a total of 7,747 weekly downloads. As such, @putout/operator-regexp popularity was classified as popular.
We found that @putout/operator-regexp demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer 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
Socket is heading to London! Stop by our booth or schedule a meeting to see what we've been working on.

Security News
OWASPâs 2025 Top 10 introduces Software Supply Chain Failures as a new category, reflecting rising concern over dependency and build system risks.

Research
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.