express-mongo-sanitize icon indicating copy to clipboard operation
express-mongo-sanitize copied to clipboard

Adding onSanitize as an option for non middleware usage

Open lifengkow opened this issue 3 years ago • 1 comments

It will be good if we can have onSanitize callback for non middleware usage

lifengkow avatar Nov 03 '22 06:11 lifengkow

The existing sanitize standalone function could be changed to return { target, isSanitized } but that would be a breaking change. Happy to implement and bump a major version if it would be useful.

fiznool avatar Nov 03 '22 06:11 fiznool