Simple, synchronous CSV conversion of a data set, using CSV Stringify https://csv.js.org/stringify/.
CSV parsing libraries are great for handling deceiptively awkward issues, such as commas internal to a field, which can affect numeric types that are formatted!