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

Method formatRawData

packages/decap-cms-core/src/backend.ts:880–889  ·  view source on GitHub ↗
(raw: string)

Source from the content-addressed store, hash-verified

878 const label = selectFileEntryLabel(collection, slug);
879
880 const formatRawData = (raw: string) => {
881 return this.entryWithFormat(collection)(
882 createEntry(collection.get('name'), slug, path, {
883 raw,
884 label,
885 mediaFiles,
886 meta: { path: prepareMetaPath(path, collection) },
887 }),
888 );
889 };
890
891 const entry: EntryValue = formatRawData(raw);
892 if (hasI18n(collection) && backup.i18n) {

Callers

nothing calls this directly

Calls 4

entryWithFormatMethod · 0.95
createEntryFunction · 0.90
prepareMetaPathFunction · 0.85
getMethod · 0.80

Tested by

no test coverage detected