Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

no-whitespace

radiovisual14MIT1.0.0

Remove absolutely all whitespace from a string.

string, from, characters, chars, spaces, space, whitespace, all, forbid, extract, erase, delete, remove

readme

no-whitespace Build Status

Remove absolutely all whitespace from a string.

Install

$ npm install --save no-whitespace

Usage

const noWhitespace = require('no-whitespace');

noWhitespace('\n\r\t unicorns & rainbows! amaze! \n\r\t');
//=> 'unicorns&rainbows!amaze!'

API

noWhitespace(input, [options])

Returns a string with all whitespace characters removed.

input

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.

License

MIT © Michael Wuergler