Remove absolutely all whitespace from a string.
$ npm install --save no-whitespace
const noWhitespace = require('no-whitespace');
noWhitespace('\n\r\t unicorns & rainbows! amaze! \n\r\t');
//=> 'unicorns&rainbows!amaze!'
Returns a string with all whitespace characters removed.
Required
Type: string
The string you want to remove all whitespace characters from.
- selective-whitespace Condense all whitespace in a string, with options to preserve specific whitespace characters.
MIT © Michael Wuergler