UNPKG

ghost

Version:

The professional publishing platform

19 lines (14 loc) 445 B
const getContextObject = require('./context_object.js'); function getModifiedDate(data) { let context = data.context ? data.context : null; let modDate; const contextObject = getContextObject(data, context); if (contextObject) { modDate = contextObject.updated_at || null; if (modDate) { return new Date(modDate).toISOString(); } } return null; } module.exports = getModifiedDate;