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.
13 lines
332 B
13 lines
332 B
8 years ago
|
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)
|
||
|
})
|
||
|
}
|