MCPcopy Create free account
hub / github.com/parse-community/parse-server / getValidObject

Method getValidObject

src/ParseServer.ts:74–88  ·  view source on GitHub ↗
(root)

Source from the content-addressed store, hash-verified

72 const interfaces = JSON.parse(JSON.stringify(OptionsDefinitions));
73
74 function getValidObject(root) {
75 const result = {};
76 for (const key in root) {
77 if (Object.prototype.hasOwnProperty.call(root[key], 'type')) {
78 if (root[key].type.endsWith('[]')) {
79 result[key] = [getValidObject(interfaces[root[key].type.slice(0, -2)])];
80 } else {
81 result[key] = getValidObject(interfaces[root[key].type]);
82 }
83 } else {
84 result[key] = '';
85 }
86 }
87 return result;
88 }
89
90 const optionsBlueprint = getValidObject(interfaces['ParseServerOptions']);
91

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected