htmlbars
htmlbars copied to clipboard
[PERF] Don't Attempt To Sanitize Unsanitizeable
This adds an identity check for falsy values before the value is
sanitized. Currently we do work to sanitize things like undefined.
This is from a bench of a thousand link-tos
Before:

After:

such Unsanitiveable
needs señor tests.
Not really sure how to test this as the sanitization function is local. Not sure how helpful the test is.