UNPKG

mobile-session-promise

Version:

The modules creates a promise that resolves an existing or creates a brand new session

7 lines (6 loc) 355 B
"use strict"; // Derive the timestamp in accordance with https://snowplowanalytics.com/blog/2015/09/15/improving-snowplows-understanding-of-time/#derived-ts // module.exports = function (body) { module.exports = (collector_tstamp, device_created_tstamp, device_sent_tstamp) => { return collector_tstamp - (device_sent_tstamp - device_created_tstamp); }