File tree Expand file tree Collapse file tree 3 files changed +7
-5
lines changed Expand file tree Collapse file tree 3 files changed +7
-5
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " json-2-csv" ,
3- "version" : " 1.3.0 " ,
3+ "version" : " 1.3.1 " ,
44 "homepage" : " https://github.com/mrodrig/json-2-csv" ,
55 "moduleType" : [
66 " node"
1818 "underscore" : " 1.8.3" ,
1919 "bluebird" : " 2.9.24"
2020 }
21- }
21+ }
Original file line number Diff line number Diff line change @@ -96,6 +96,8 @@ var convertField = function (value) {
9696 return options . DELIMITER . WRAP + value . toString ( ) + options . DELIMITER . WRAP ;
9797 } else if ( _ . isObject ( value ) ) { // If we have an object
9898 return options . DELIMITER . WRAP + convertData ( value , _ . keys ( value ) ) + options . DELIMITER . WRAP ; // Push the recursively generated CSV
99+ } else if ( _ . isNumber ( value ) ) { // If we have a number (avoids 0 being converted to '')
100+ return options . DELIMITER . WRAP + value . toString ( ) + options . DELIMITER . WRAP ;
99101 }
100102 return options . DELIMITER . WRAP + ( value ? value . toString ( ) : '' ) + options . DELIMITER . WRAP ; // Otherwise push the current value
101103} ;
@@ -165,4 +167,4 @@ module.exports = {
165167 } ) ;
166168 }
167169
168- } ;
170+ } ;
Original file line number Diff line number Diff line change 22 "author" : " mrodrig" ,
33 "name" : " json-2-csv" ,
44 "description" : " A JSON to CSV and CSV to JSON converter that natively supports sub-documents and auto-generates the CSV heading." ,
5- "version" : " 1.3.0 " ,
5+ "version" : " 1.3.1 " ,
66 "repository" : {
77 "type" : " git" ,
88 "url" : " http://github.com/mrodrig/json-2-csv.git"
3838 "node" : " *"
3939 },
4040 "license" : " MIT"
41- }
41+ }
You can’t perform that action at this time.
0 commit comments