function bool(r, ...keys) { for (const k of keys) { const v = r[k]; if (v === true || v === "true") return true; } return false; } function mapUserRecord(r) { return { id: r.id, email: r.email, name: r.name, avatar: r.avatar, darkmode: bool(r, "darkmode"), prism: bool(r, "PRISM", "prism", "Prism"), tasgrid: bool(r, "TasGrid", "tasgrid"), stackq: bool(r, "Stackq", "stackq"), hrm: bool(r, "HRM", "hrm", "Hrm") }; } export { mapUserRecord as m };