Lines to Comma List
Join non-empty lines with ', ' to create a single comma list.
How to use
- Enter the vertical list and run the join.
Capabilities and scope
Only exactly empty strings are filtered; a whitespace-only line is truthy and can remain as an item.
How it works
The implementation is lines.filter(Boolean).join(", ").
Example
a b c becomes a, b, c.
Useful for
- Convert a vertical list to a simple inline list
Before you use it
- Commas inside values are not quoted, so this is not a CSV serializer.
Frequently asked questions
Are blank lines removed?
Zero-length lines are removed, but whitespace-only lines currently pass the Boolean filter.