You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12 lines
332 B
12 lines
332 B
exports.compare = function (a, b) {
|
|
return a.serial.localeCompare(b.serial) ||
|
|
// for the case serials are a same value on old logs
|
|
a.created.getTime() - b.created.getTime()
|
|
}
|
|
|
|
exports.deserialize = function (log) {
|
|
return Object.assign({}, log, {
|
|
data: new Date(log.date),
|
|
created: new Date(log.created)
|
|
})
|
|
}
|
|
|