MCPcopy
hub / github.com/parse-community/parse-server / cleanUpIndexes

Function cleanUpIndexes

spec/DefinedSchemas.spec.js:4–11  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2const Config = require('../lib/Config');
3
4const cleanUpIndexes = schema => {
5 if (schema.indexes) {
6 delete schema.indexes._id_;
7 if (!Object.keys(schema.indexes).length) {
8 delete schema.indexes;
9 }
10 }
11};
12
13describe('DefinedSchemas', () => {
14 let config;

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected