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

Function createEntry

packages/decap-cms-core/src/valueObjects/Entry.ts:44–63  ·  view source on GitHub ↗
(collection: string, slug = '', path = '', options: Options = {})

Source from the content-addressed store, hash-verified

42}
43
44export function createEntry(collection: string, slug = '', path = '', options: Options = {}) {
45 const returnObj: EntryValue = {
46 collection,
47 slug,
48 path,
49 partial: options.partial || false,
50 raw: options.raw || '',
51 data: options.data || {},
52 label: options.label || null,
53 isModification: isBoolean(options.isModification) ? options.isModification : null,
54 mediaFiles: options.mediaFiles || [],
55 author: options.author || '',
56 updatedOn: options.updatedOn || '',
57 status: options.status || '',
58 meta: options.meta || {},
59 i18n: options.i18n || {},
60 };
61
62 return returnObj;
63}

Callers 10

processEntriesMethod · 0.90
formatRawDataMethod · 0.90
getEntryValueMethod · 0.90
formatDataMethod · 0.90
draftDuplicateEntryFunction · 0.90
createEmptyDraftFunction · 0.90
searchMethod · 0.90
listEntriesMethod · 0.90
listAllEntriesMethod · 0.90
getEntryMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected