2016-10-10 15:34:21 -03:00
|
|
|
export function createEntry(collection, slug = '', path = '', options = {}) {
|
2016-08-24 21:36:44 -03:00
|
|
|
const returnObj = {};
|
2016-10-10 15:34:21 -03:00
|
|
|
returnObj.collection = collection;
|
2016-08-24 21:36:44 -03:00
|
|
|
returnObj.slug = slug;
|
2016-10-10 15:34:21 -03:00
|
|
|
returnObj.path = path;
|
|
|
|
returnObj.partial = options.partial || false;
|
|
|
|
returnObj.raw = options.raw || '';
|
|
|
|
returnObj.data = options.data || {};
|
2016-10-21 20:42:14 -02:00
|
|
|
returnObj.label = options.label || null;
|
2016-10-10 15:34:21 -03:00
|
|
|
returnObj.metaData = options.metaData || null;
|
2016-08-24 21:36:44 -03:00
|
|
|
return returnObj;
|
|
|
|
}
|