Multi-string replacer helper for Javascript
npm install multi-replacer##Introduction
A simple helper created to allow replacing strings with multiple search values.
##Usage
The multiReplace function accepts three arguments namely:
This is an awesome test case.origStr - the raw string (e.g. , 'Hello World') searchStrArr - array of characters to be replaced. (e.g. [,
rplcStr - the character/string replacement (e.g. '', 'A' or any other string)##Example
`` javascript
var replace = require('multi-replacer');
var multiReplace = replacer.multiReplace;
var origStr = '
Anyone here wants to code?
';', '
'];var outStr = multiReplace(origStr, searchStrArr, "") //replace
&
with empty character;console.log(outStr); //Anyone here wants to code?
`
##Test
npm test`
##Note
This is still a WIP, will use ES6 in the future.