badele / cfwf

Read and write Customized Fixed Width Format flat file library
2 stars 0 forks source link

Too big title size #20

Closed badele closed 1 year ago

badele commented 1 year ago

This error is generated when there is a title longer than the width of the dataset (number of characters).

error: Uncaught (in promise) RangeError: Invalid count value: -14.5
      ageneratedtitle[idx] = " ".repeat(nbspace) +
                                 ^
    at String.repeat (<anonymous>)
    at CFWF._generateTitle (https://deno.land/x/cfwf@0.3.0/src/cfwf.ts:62:34)
    at async CFWF.outputCFWF (https://deno.land/x/cfwf@0.3.0/src/cfwf.ts:248:7)
    at async CFWF.saveCFWF (https://deno.land/x/cfwf@0.3.0/src/cfwf.ts:85:36)