Skip to content

armgit / ECC

Public Imported from GitHub
0

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

460 B
Raw Blame
'use strict';

const SEPARATOR = ';';
const NEWLINE = '\r\n';

function quote(value) {
  const text = value === undefined || value === null ? '' : String(value);
  return `"${text.replace(/"/g, '""')}"`;
}

/** Semicolon separated, CRLF terminated, every field quoted: what the ERP import accepts. */
function exportCsv(rows) {
  return rows.map(row => Object.values(row).map(quote).join(SEPARATOR)).join(NEWLINE) + NEWLINE;
}

module.exports = { exportCsv };