Trim-whitespace ⬜️

@common-utilities/trim-whitespace 🧰

Typed with TypeScriptarrow-up-right npm versionarrow-up-right

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 utilitiesarrow-up-right on Github.

Last updated