danielgindi / node-csv-reader

A CSV stream reader, with many many features, and ability to work with the largest datasets
MIT License
35 stars 11 forks source link

trim logic doesn't affect both ends of the string #9

Closed drewed closed 4 years ago

drewed commented 5 years ago

Your regex /^\s+|\s+$/ will only trim whitespace at the beginning or the end of the string but not both. Is there a reason you're not using String.prototype.trim()?

danielgindi commented 4 years ago

Just an oversight!