flatiron/revalidator — pull request #38 by ericchaves (2012-12-23 15:18:49+00:00)
Title: Feature to add defaults when missing and fixed small glitch in mixins 

Hi guys,

I added a feature to revalidator for it to add missing properties into objects when the property schema has a default value.

In order to keep compatibility with legacy code this feature is disabled by default and to use it one must pass addMissingDefaults option as true (ugly name, feel free to change if you decide to accept the feature).

Also, during tests I noticed that the mixin function was always imposing default values over options passed by the user. The fix as simple, just altered the order in which objects are passed in the mixing.

Cheers,

Eric