
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
babel-plugin-utf-8-regex
Advanced tools
transforms regexes like /\p{Letter}/ into working js regexes
Transforms a regular expression like /^\p{Cyrillic}+$/
to /^[Ѐ-҄҇-ԧᴫᵸⷠ-ⷿꙀ-ꚗꚟ]+$/
.
This Plugin was inspired by the unicode addon of xregexp. The list of possible types are explained here or can be found in the code. The most useful probably is \p{L}
or its alias \p{Letter}
which indicates any letter in any alphabet.
It also works with negations: either \P{L}
or \p{^L}
.
\p{TYPE}
into [TYPE-RANGES]
. This means that regular expressions like /[\p{Arabic}\p{Greek}]/
or /[^0-9\p{White_Space}]/
won't be correctly translated.So either commit a pull request or use something like /(\p{Arabic}|\p{Greek})/
for now.
npm install babel-plugin-utf-8-regex
Node API:
require("babel").transform("code", {
plugins: ["babel-plugin-utf-8-regex"]
});
CLI:
babel --plugins babel-plugin-utf-8-regex script.js
babelrc:
{
"plugins": ["babel-plugin-utf-8-regex"]
}
Contributions are more than welcome!
Clone this repo, hack around, add your tests and hit npm test
.
/\p{L}-\p{L}/
would be translated to something like var regexTypes = require("regexTypes"); [..] new RegExp(regexTypes.L+"-"+regexTypes.L)
FAQs
transforms regexes like /\p{Letter}/ into working js regexes
The npm package babel-plugin-utf-8-regex receives a total of 34 weekly downloads. As such, babel-plugin-utf-8-regex popularity was classified as not popular.
We found that babel-plugin-utf-8-regex demonstrated a not healthy version release cadence and project activity because the last version was released 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
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.