html-sloppy-escaper

It's exactly like html-escaper but it doesn't throw with null/undefined

Usage no npm install needed!

<script type="module">
  import htmlSloppyEscaper from 'https://cdn.skypack.dev/html-sloppy-escaper';
</script>

README

html-sloppy-escaper

Build Status Coverage Status

This is exactly the same html-escaper module, except it doesn't throw with null or undefined, and returns either null or undefined instead, when passed along.

Symbols are also transformed as string, so basically this module should never throw.

This is the result of this discussion regarding html-escaper strictness.

If you don't care about the data you pass along, this module is likely more suitable.