kriszyp/json-schema

validate shouldn't mutate input

jfirebaugh opened this issue · 1 comments

validate will mutate the input object by adding default values for missing defaults. This is unexpected and in the typical case undesired -- the name validate implies a function to check, not modify, the input.

+1, that is an odd behavior. But, when this is fixed there should be a way to get the modified object with defaults inserted - just not by it mutating the input.