Skip to content

Commit

Permalink
Style(main): Minor tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
fvdm committed Dec 6, 2017
1 parent 5f920f9 commit 1294835
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions readcsv.js
Expand Up @@ -4,7 +4,7 @@ Description: Parse CSV file with automatic format detection
Author: Franklin van de Meent (https://frankl.in)
Source code: https://github.com/fvdm/nodejs-readcsv
Feedback: https://github.com/fvdm/nodejs-readcsv/issues
License: Unlicense / Public Domain
License: Unlicense (Public Domain)
(https://github.com/fvdm/nodejs-readcsv/raw/master/LICENSE)
*/

Expand All @@ -29,7 +29,8 @@ module.exports = (head, file, callback) => {
}

linebreak = data.slice (-2) === '\r\n' ? '\r\n' : '\n';
data = data.trim()
data = data
.trim()
.split (linebreak);

if (data[0].match ('\',\'')) {
Expand Down

0 comments on commit 1294835

Please sign in to comment.