13 lines
427 B
JavaScript
Raw Normal View History

export function createEntry(collection, slug = '', path = '', options = {}) {
2016-08-24 21:36:44 -03:00
const returnObj = {};
returnObj.collection = collection;
2016-08-24 21:36:44 -03:00
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;
2016-08-24 21:36:44 -03:00
return returnObj;
}