import sanitize from 'sanitize-html' ; export function sanitizeObject < T > ( obj ) { return Object . keys ( obj ) . reduce ( ( all , argName ) => ( { ... all , [ argName ] : sanitize ( obj [ argName ] , { allowedTags : [ ] , allowedAttributes : { } , } ) , } ) , { } ) as T ; }