From 1bb8c96c0731b092dca598de972f58ad92f8087d Mon Sep 17 00:00:00 2001 From: Roman Timashev Date: Thu, 25 Feb 2016 18:06:20 +0300 Subject: [PATCH] + string util --- src/utils/string.js | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 src/utils/string.js 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);