Cássio Souza 2496ec09a4 Single file collections (#132)
* Files based collections skeleton

* listing file based cards

* create new entry with collection

* moved lookupEntry to main backend

* Editing single page Collections file

* List widget basic implementation

* Adjustments for test-repo

* check if value exists before trying to iterate over
2016-10-21 20:42:14 -02:00

13 lines
427 B
JavaScript

export function createEntry(collection, slug = '', path = '', options = {}) {
const returnObj = {};
returnObj.collection = collection;
returnObj.slug = slug;
returnObj.path = path;
returnObj.partial = options.partial || false;
returnObj.raw = options.raw || '';
returnObj.data = options.data || {};
returnObj.label = options.label || null;
returnObj.metaData = options.metaData || null;
return returnObj;
}