|
|
@ -20,6 +20,7 @@ export function serializeFunctions(value: any, key?: string): any {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
export function deserializeFunctions(value: any): any {
|
|
|
|
export function deserializeFunctions(value: any): any {
|
|
|
|
if (Array.isArray(value)) {
|
|
|
|
if (Array.isArray(value)) {
|
|
|
|
return value.map(deserializeFunctions)
|
|
|
|
return value.map(deserializeFunctions)
|
|
|
@ -34,3 +35,7 @@ export function deserializeFunctions(value: any): any {
|
|
|
|
return value
|
|
|
|
return value
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export const deserializeFunctions =
|
|
|
|
|
|
|
|
'function deserializeFunctions(r){return Array.isArray(r)?r.map(deserializeFunctions):typeof r=="object"&&r!==null?Object.keys(r).reduce((t,n)=>(t[n]=deserializeFunctions(r[n]),t),{}):typeof r=="string"&&r.startsWith("_vp-fn_")?new Function(`return ${r.slice(7)}`)():r}'
|
|
|
|