mass-replacer
v1.0.3
Published
A lightweight package to mass replace text using objects, no regex needed.
Downloads
6
Maintainers
Readme
mass-replacer
A lightweight package for mass replacing values within strings using objects, no regexes or 100s of .replace()
needed.
Installation
npm install mass-replacer
Usage
const massReplace = require("mass-replacer")
massReplace.replacer("string", {"value1":"replacer1", "value2":"replacer2"}, "regexFlag")
Example
const massReplace = require("mass-replacer")
massReplace.replacer("Hello World", {"World":"Planet", "Hello":"Hey"}, "gi")
//Returns "Hey Planet"