@rip-lang/csv 1.0.3 → 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/csv.rip +10 -7
- package/package.json +1 -1
package/csv.rip
CHANGED
|
@@ -369,13 +369,16 @@ class Writer
|
|
|
369
369
|
|
|
370
370
|
formatted = switch @mode
|
|
371
371
|
when 'compact'
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
cell
|
|
372
|
+
if not @excel and not @needsQuote(cells.join(''))
|
|
373
|
+
cells
|
|
374
|
+
else
|
|
375
|
+
for cell in cells
|
|
376
|
+
if @excel and @leadZero.test(cell)
|
|
377
|
+
"=#{q}#{cell}#{q}"
|
|
378
|
+
else if @needsQuote(cell)
|
|
379
|
+
"#{q}#{cell.replaceAll(q, esc)}#{q}"
|
|
380
|
+
else
|
|
381
|
+
cell
|
|
379
382
|
when 'full'
|
|
380
383
|
for cell in cells
|
|
381
384
|
if @excel and @leadZero.test(cell)
|