trim-all
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

trim-all

Remove extra whitespace

JavaScript function that accepts a string. The string is returned with all whitespace runs replaced with a single space and whitespace removed from both ends of the string.

Example

trimAll(`
    Darkwing Duck
                 When there's trouble you
                                         Call DW
`);

// returns "Darkwing Duck When there's trouble you Call DW"

Readme

Keywords

Package Sidebar

Install

npm i trim-all

Weekly Downloads

1

Version

1.0.3

License

ISC

Unpacked Size

1.73 kB

Total Files

4

Last publish

Collaborators

  • nicholasbg