MCPcopy Create free account
hub / github.com/decaporg/decap-cms / prepareMetaPath

Function prepareMetaPath

packages/decap-cms-core/src/backend.ts:313–319  ·  view source on GitHub ↗
(path: string, collection: Collection)

Source from the content-addressed store, hash-verified

311};
312
313function prepareMetaPath(path: string, collection: Collection) {
314 if (!selectHasMetaPath(collection)) {
315 return path;
316 }
317 const dir = dirname(path);
318 return dir.slice(collection.get('folder')!.length + 1) || '/';
319}
320
321function collectionDepth(collection: Collection) {
322 let depth;

Callers 4

processEntriesMethod · 0.85
formatRawDataMethod · 0.85
getEntryValueMethod · 0.85
formatDataMethod · 0.85

Calls 2

selectHasMetaPathFunction · 0.90
getMethod · 0.80

Tested by

no test coverage detected