Skip to content

Commit

Permalink
CSV encoding
Browse files Browse the repository at this point in the history
  • Loading branch information
Maximillian Murphy committed Mar 20, 2018
1 parent da16f78 commit f1944ff
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion bin/csv.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ function csvRecord(record){
(x===undefined)?''
:(x===null)?''
:(x==='')?''
:(typeof(x)==="string")?'"'+x.replace(/"/g,'""').replace(/\r/g,'\\r').replace(/\n/g,'\\n').replace(/\t/g,'\\t')+'"'
:(typeof(x)==="string")?'"'+x.replace(/\\/g,'\\\\').replace(/"/g,'""').replace(/\r/g,'\\r').replace(/\n/g,'\\n').replace(/\t/g,'\\t')+'"'
:String(x)
).join(",");
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jline",
"version": "0.0.47",
"version": "0.0.48",
"description": "Sort, grep and join files where every line is JSON.",
"main": "index.js",
"bin": {
Expand Down

0 comments on commit f1944ff

Please sign in to comment.