vox-server/interchangedb.js
function ensureTimestamps(columns, allowSyncedAt) {
  var now = Date.now();
  if (!allowSyncedAt || !columns.syncedAt) {
    columns.syncedAt = now;
  }
  if (!columns.createdAt) {
    // Take the value from the client, if present:
    columns.createdAt = columns.updatedAt;
  }
}
function ensureTimestamps(columns, allowSyncedAt) {
  var now = Date.now();
  if (!allowSyncedAt || !columns.syncedAt) {
    columns.syncedAt = now;
  }
  if (!columns.createdAt) {
    // Take the value from the client, if present:
    columns.createdAt = columns.updatedAt;
  }
}
function ensureTimestamps ( columns , allowSyncedAt ) { var now = Date . now ( ) ; if ( ! allowSyncedAt || ! columns . syncedAt ) { columns . syncedAt = now ; } if ( ! columns . createdAt ) { // Take the value from the client, if present: columns . createdAt = columns . updatedAt ; } }
Sets the `syncedAt` and `createdAt` timestamps, if they are not set.
Sets the syncedAt and createdAt timestamps if they are not set .