MCPcopy
hub / github.com/chartbrew/chartbrew / toPlainObject

Function toPlainObject

server/controllers/TemplateController.js:6–9  ·  view source on GitHub ↗
(record)

Source from the content-addressed store, hash-verified

4const chartDatasetConfigAttributeExcludes = ["id", "chart_id", "createdAt", "updatedAt"];
5
6const toPlainObject = (record) => {
7 if (!record) return record;
8 return record.toJSON ? record.toJSON() : { ...record };
9};
10
11const sanitizeTemplateChart = (chart, tid) => {
12 const safeChart = toPlainObject(chart);

Callers 4

sanitizeTemplateChartFunction · 0.70
sanitizeTemplateDatasetFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected