text-sanitizer

Usage example:

Usage no npm install needed!

<script type="module">
  import textSanitizer from 'https://cdn.skypack.dev/text-sanitizer';
</script>

README

text-sanitizer

Usage example:

var sanitize = require('text-sanitizer');

var input = "\n\n Some text with multiple new \n\n\n lines and \t\t\t tabs."

input = sanitize(input, ['trim']);

// Output will be
// Some text with multiple new \n lines and \t tabs.