Trim whitespace from each line
Trim whitespace from indented lines
$ echo " hello world foo " | trim-lines
(input) => input .split("\n") .map((l) => l.trim()) .join("\n")
$ trim-lines | sort-lines | unique-lines
$ trim-lines | lowercase | slugify
$ trim-lines | squeeze | wc