iriscouch/txn — pull request #3 by perezd (2012-07-19 00:28:50+00:00)
Title: adds the ability to define a custom timestamp generator

Hey there, I've added the ability for you to define a custom timestamp generator when using timestamps (created_at/updated_at).

This is really useful because I like storing dates as unix time (easier for indexing/sorting later). This is how its used:

```
txn = require('txn').defaults({timestamps: true, timestamp_generator: function() { return new Date().getTime() });
```

It works as usual, if nothing is specified. We could rename the property, if you have a better idea for what it should be called.