blakeembrey/jquery-lifestream — comment on commit d685983656d6868bd37204e2de7921a7d0d1602f
File: src/services/hypem.js line 35
By christianv:

This is quite a bit of code duplication.
Personally I would do something like this instead:

```javascript
output.push({
date: new Date( (config.type === "history" ? item.dateloved : item.dateloved) * 1000 ),
config: config,
html: $.tmpl( (config.type === "history" ? template.loved : template.history) , item )
});
```

That's a personal preference though and I didn't test whether it actually works.