In The Name Of God
Replacer is a micro JS library
that replaces a variable texts with it's value.
To use:
- Create an array
- Create an array for each variable
- In every array, we have two strings:
- The first string is the variable name.
- It can be anything
- The second string is the text you want to replace with.
- It can be HTML plain texts
- Call the
$_replacer()
function and pass the variable as the argument.
For example:
var replaceThis = [
[
"BTN",
"button button-primary border-red color-green"
],
[
"%-Helloee-&&",
"Hello World!, I am using replacerJS to make my HTML codes prettier"
]
];
// Call the function
$_replacer(replaceThis);