zet-lib 1.0.78 → 1.0.79
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/Util.js +3 -3
- package/package.json +1 -1
package/lib/Util.js
CHANGED
|
@@ -207,7 +207,7 @@ Util.tableArrayToObj = (arr = []) => {
|
|
|
207
207
|
return arr.map((m) => Object.values(m)[0])
|
|
208
208
|
}
|
|
209
209
|
|
|
210
|
-
Util.escapeRegExp = function (str
|
|
210
|
+
Util.escapeRegExp = function (str = '') {
|
|
211
211
|
return str.replace(/([.*+?^=!:${}()|\[\]\/\\])/g, '\\$1')
|
|
212
212
|
}
|
|
213
213
|
|
|
@@ -221,7 +221,7 @@ Util.validateEmail = function (email) {
|
|
|
221
221
|
example : Util.replaceAll("abd","a","")
|
|
222
222
|
*/
|
|
223
223
|
|
|
224
|
-
Util.replaceAll = function (str =
|
|
224
|
+
Util.replaceAll = function (str = '', find, replace) {
|
|
225
225
|
let t = ''
|
|
226
226
|
if (Array.isArray(find)) {
|
|
227
227
|
t = str
|
|
@@ -295,7 +295,7 @@ Util.arrayToObject = (array = [], keyField, isInteger = false) => {
|
|
|
295
295
|
}
|
|
296
296
|
|
|
297
297
|
//chase id:1,name:'test' t0 {1:'test'}
|
|
298
|
-
Util.modulesSwitch = (arr =[]) => {
|
|
298
|
+
Util.modulesSwitch = (arr = []) => {
|
|
299
299
|
let stores = []
|
|
300
300
|
stores.push({ id: '', name: '' })
|
|
301
301
|
arr.forEach((ar, index) => {
|