
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
ultimate-string-replace
Advanced tools
Javascript library to allow to find and wrap matches in a string.
It's main purpose is to be used in filters of objects, so you can highlight matches.
If the string has accents, ultimate-string-replace will get rid of them and match anyway.
If the string to match has accents, it will only match exact matches (case-insensitive).
npm i -S ultimate-string-replace
ultimate-string-replace is also published in bower
bower install ultimate-string-replace
import ultimateStringReplace from 'ultimate-string-replace';
const data = "Crème brûlée"
const response = ultimateStringReplace(data, "rème brûlée", {'wrap_preffix': "<b>", 'wrap_sufix': "</b>" })
// Result -> 'C<b>rème brûlée</b>';
| Matcher | Input | Output |
|---|---|---|
he | Hello hello | <b>He</b>llo <b>he</b>llo |
23 | 12 34 | 1<b>2 3</b>4 |
rème brûlée | Crème brûlée | C<b>rème brûlée</b> |
ví | Víctor victor Victor | <b>Ví</b>ctor victor Victor |
vi | Víctor victor Victor | <b>Ví</b>ctor <b>vi</b>ctor <b>Vi<b>ctor |
Ví | Víctor victor Victor | <b>Ví</b>ctor victor Victor |
no | Víctor victor Victor | false |
npm run test
npm run build
ultimate-string-replace is written as an ES6 module, but it also gets transpiled to ES5.
PR Welcome!
FAQs
JS module to improve string.prototype.replace
We found that ultimate-string-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.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.