just-squash
TypeScript icon, indicating that this package has built-in type declarations

2.2.0 • Public • Published

just-squash

Part of a library of zero-dependency npm modules that do just do one thing. Guilt-free utilities for every occasion.

🍦 Try it

npm install just-squash
yarn add just-squash

Remove all spaces from a string, optionally remove escape sequences too

  squash('the cat sat on the mat'); // 'thecatsatonthemat'
  squash(' the cat sat on the mat '); // 'thecatsatonthemat'
  squash('\tthe cat\n sat \fon \vthe \rmat '); // '\tthecat\nsat\fon\vthe\rmat'
  squash('\tthe cat\n sat \fon \vthe \rmat ', true); // 'thecatsatonthemat'
  squash(`the cat
sat on the mat`, true); // thecatsatonthemat

Package Sidebar

Install

npm i just-squash

Weekly Downloads

18

Version

2.2.0

License

MIT

Unpacked Size

6.66 kB

Total Files

9

Last publish

Collaborators

  • angus-c