13 lines
213 B
JavaScript
13 lines
213 B
JavaScript
return {
|
|
timestamp: timestamp
|
|
};
|
|
|
|
function timestamp(o, field) {
|
|
var field = field || 'date';
|
|
var clone = {};
|
|
for(var key in o) {
|
|
clone[key] = o[key];
|
|
}
|
|
clone[field] = Date.now();
|
|
return clone;
|
|
}
|