Message from JavaScript discussions

July 2017

— Hm

— 

wordWrap("This has               a lot        of whitespace", 10);

Segments:
 ["This has   ", "           ", " a lot     ", "   of ", "whitespace"]

Result:
"This has

a lot
of
whitespace"

— Kek

— Well, what matters is I made the tests pass, so I hope that is not a deal breaker

— Maybe just trim the segments?

— Or too late?

— Too late

— My function trims within same lines as well

— This has\n\n ...

— It makes an empty string

— Tbh wordwrap is a strange function as well

— Then joins the empty string with a newline