pipr.tools
Pipes
Clean Email Strip formatting from pasted email for clean plain text Clean AI Output Clean plain text from ChatGPT or AI output Decode & Format JWT Decode a JWT and pretty-print header and payload Word Frequency Count word frequency in text

trim-lines Trim whitespace from each line

Aa Text
Input0 chars
Output0 chars

Examples

Clean up whitespace from copy-pasted config

Usage
"  name: Alice  
  role: admin  
  team: platform  " | trim-lines

Trim spaces from an email list pasted from a spreadsheet

Usage
"  [email protected]  
  [email protected]  
  [email protected]  " | trim-lines

Fix messy formatting on copy-pasted document titles

Usage
"   Quarterly Report   
   Budget Summary   
   Action Items ..." | trim-lines
View source
(input)=>input.split("\n").map((l)=>l.trim()).join("\n")