import { isObject } from "./common" ; param item export const escapeSingle = < TItem > ( item ) : TItem => { const result = { } ; Object . keys ( item ) . forEach ( key => { result [ key ] = isObject ( item [ key ] ) ? JSON . stringify ( item [ key ] ) : item [ key ] ; } ) ; return result as TItem ; } ; param items export const escape = < TItem > ( items ) : TItem [ ] => items . map ( escapeSingle ) ; param items export const removeId = < TItem > ( items ) : TItem [ ] => items . map ( item => { const { id , ... rest } = item as Record < string , unknown > ; return rest as unknown as TItem ; } ) ;