
Security News
Browserslist-rs Gets Major Refactor, Cutting Binary Size by Over 1MB
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
sim-replace
Advanced tools
A small utility to execute multiple replaces simultaneously
sim-replace, or Simultaneous Replace, is a small utilty that will execute mutliple regex replaces simultaneously.
Install via Yarn (recommended):
yarn add sim-replace -D
Install via NPM:
npm install sim-replace --save-dev
Note that we're using ES6 import statements here. Usage with require
works just as well.
import simReplace from 'sim-replace'
let text = 'There was a cow and a cat'
let result = simReplace(text, [
[/cow/g, 'cat'],
[/cat/g, 'cow']
])
result === 'There was a cat and a cow' // true
It also supports capturing group placeholders
import simReplace from 'sim-replace'
let text = 'This is my sister'
let result = simReplace(text, [
[/(my sister)/g, 'Fanny, $1']
])
result === 'This is Fanny, my sister' // true
git checkout -b feature/fooBar
)git commit -am 'Add some fooBar'
)git push origin feature/fooBar
)Malcolm Nihlén - malcolm.nihlen@gmail.com
Distributed under the MIT licence. See LICENCE
for more information.
FAQs
A small utility to execute multiple replaces simultaneously
The npm package sim-replace receives a total of 7 weekly downloads. As such, sim-replace popularity was classified as not popular.
We found that sim-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
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
Research
Security News
Eight new malicious Firefox extensions impersonate games, steal OAuth tokens, hijack sessions, and exploit browser permissions to spy on users.
Security News
The official Go SDK for the Model Context Protocol is in development, with a stable, production-ready release expected by August 2025.