Schema-Inspector is a powerful tool to sanitize and validate JS objects.
schema-inspector.github.io/schema-inspector/
schema-inspector/schema-inspector