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.
let text = 'There was a cow and a cat'let result =result === 'There was a cat and a cow' // true
It also supports capturing group placeholders
let text = 'This is my sister'let result =result === 'This is Fanny, my sister' // true
- Fork it (https://github.com/scriptcoded/sim-replace/fork)
- Create your feature branch (
git checkout -b feature/fooBar)
- Commit your changes (
git commit -am 'Add some fooBar')
- Push to the branch (
git push origin feature/fooBar)
- Create a new Pull Request
Malcolm Nihlén - firstname.lastname@example.org
Distributed under the MIT licence. See
LICENCE for more information.