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

Function createEntry

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

Source from the content-addressed store, hash-verified

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

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