jonschlinkert / word-wrap

Wrap words to a specified length.
https://github.com/jonschlinkert
MIT License
194 stars 57 forks source link

Implement, document, and test 'amendOrphan' #14

Open olsonpm opened 8 years ago

olsonpm commented 8 years ago

Should be well commented/documented. I hadn't realized _.words filters out non alphanumeric characters by default, so the definition of 'word' is simplified to be /\s+/ delimited.

I also tried to keep within well-supported string and array functions. If I added any which reasonably older browsers don't support, please yell.