trim-lines is a small utility that removes initial and final spaces and tabs around line endings in a string, while keeping the line endings themselves. It is useful when you want “markdown-like” whitespace trimming around line breaks without trimming whitespace at the start or end of the entire string.
Project status
- The project appears to be maintained at least through late 2022 (latest upstream push noted as 2022-11-23), with no evidence of further updates after the 2022-07-03 patch.
- Update cadence is relatively infrequent, with updates in 2021 (2.0.0), mid 2022 (3.0.0 and 3.0.1), and then no shown updates beyond that window.
AI summary generated Today
Recent updates
3.0.1
7/3/2022Release 3.0.1 is a small patch intended to improve performance of the trimming logic in `trim-lines`. The published notes only mention faster trimming, with no mention of behavioral or compatibility changes.
3.0.0
6/26/2022Release 3.0.0 updates `trimLines` to handle different newline types (LF, CRLF, and CR) and refactors the implementation for better performance. It also changes whitespace trimming behavior so it no longer removes blank lines.
BreakingFeatures2.0.0
3/11/2021Release 2.0.0 converts the library to an ESM-first setup, adds JSDoc-based type declarations, and refactors the build output. The runtime API is still a single trimLines function, but the module shape and published files changed.
BreakingFeatures