Trim-whitespace ⬜️

@common-utilities/trim-whitespace 🧰

Typed with TypeScript npm version

A common function for trimming whitespace without regex!

Install

yarn add @common-utilities/trim-whitespace -D

Usage

trimWhitespace('    This is some  really crazy.     string.   ')
// This is some really crazy. string.

Common Utilities 🧰

No cruft. No bloat. No dependencies.

Simple, typed, functional, documented, and tested javascript utility functions.

View other common utilities on Github.

Last updated

Was this helpful?