Skip to content

BeechCMS


BeechCMS / @beechcms/core / toCsvCells

Function: toCsvCells() ​

toCsvCells(record, columns): (string | null)[]

Projects an API-shaped record onto columns as CSV cells. null/undefined become an empty field; booleans become true/false; everything else is stringified. The record is expected to have already passed through dbToApi, so a date branch arrives as a number and is written as its unix-seconds integer.

Parameters ​

record ​

TransferRecord

columns ​

string[]

Returns ​

(string | null)[]