1.0.3 • Published 4 years ago

mass-replacer v1.0.3

Weekly downloads
-
License
ISC
Repository
-
Last release
4 years ago

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"