@s-libs/js-core
    Preparing search index...

    Function toCsv

    • Converts a 2D array to a csv string. Values are converted using micro-dash's toString().

      toCsv([["a", "b", "c"], ["d", "e", "f"], ["g", "h", "i"]]); // "a,b,c\nd,e,f\ng,h,i"
      toCsv([
      ["a", "", "string"]
      [undefined, null],
      [true, false],
      [1, 2, 3],
      [{}, { hi: "there" }]
      ]) // "a,,string\n,\ntrue,false\n1,2,3\n[object Object],[object Object]"

      Parameters

      • content: any[][]

      Returns string