
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
babel-plugin-search-and-replace
Advanced tools
It replaces specified string literals
yarn add babel-plugin-search-and-replace
npm i babel-plugin-search-and-replace
pnpm add babel-plugin-search-and-replace
Add the following lines in your .babelrc.
{
"plugins": [
[
"search-and-replace",
{
"rules": [
{
"search": "searchedString",
"searchTemplateStrings": true,
"replace": "replacement"
},
{
"search": /myRegex/,
"replace": "replacement"
}
]
}
]
]
}
If the search
key is a string it will search exactly this string.
For example with this config
"rules": [{
"search": "foo",
"replace": "baz",
}]
str1
will be replaced but not str 2
const str1 = "foo"
const str2 = "foo don't match"
If you want str2
to be replaced, use the regex syntax
"rules": [{
"search": /foo/,
"replace": "baz",
}]
For Babel < 7 use babel-plugin-search-and-replace@0.3.0 (does not support template strings)
{
"plugins": [
[
"search-and-replace",
[
{
"search": "searchedString",
"replace": "replacement"
},
{
"search": /myRegex/,
"replace": "replacement"
}
]
]
]
}
1.1.1
FAQs
## What it does
The npm package babel-plugin-search-and-replace receives a total of 27,656 weekly downloads. As such, babel-plugin-search-and-replace popularity was classified as popular.
We found that babel-plugin-search-and-replace 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.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.