This commit is contained in:
@@ -109,6 +109,13 @@ const Utils = {
|
||||
escapeRegExp(string) {
|
||||
return string && string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); // $& means the whole matched string
|
||||
},
|
||||
|
||||
toSafeJSON(data){
|
||||
data = Utils.deepMerge({}, data, (k, v)=>{
|
||||
return k.startsWith('__') ? undefined : v;
|
||||
})
|
||||
return JSON.stringify(data);
|
||||
}
|
||||
}
|
||||
|
||||
export default Utils;
|
||||
Reference in New Issue
Block a user