3 var getVersion = require('gitter-web-serialization/lib/get-model-version');
5 function formatDate(d) {
6 return d ? d.toISOString() : null;
9 function EventStrategy(options) {
10 if (!options) options = {};
12 this.preload = function() {};
14 this.map = function(item) {
15 var prerendered = item.meta && item.meta.prerendered;
21 sent: formatDate(item.sent),
22 editedAt: formatDate(item.editedAt),
23 meta: item.meta || {},
24 payload: prerendered ? undefined : item.payload,
30 EventStrategy.prototype = {
34 module.exports = EventStrategy;