diff --git a/src/utils/string.js b/src/utils/string.js new file mode 100644 index 00000000..4f0d6ee5 --- /dev/null +++ b/src/utils/string.js @@ -0,0 +1,8 @@ +/** + * Return a function that accept one String parameter and returns result of replacing. + * + * @param searchValue + * @param replaceValue + */ +export const stringReplace = (searchValue, replaceValue) => + str => str.replace(searchValue, replaceValue);