As a side note, I'm a fan of the [extend](https://npmjs.org/package/extend) module on npm for this kind of thing.