You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What problem do you want to solve?
I want a non-mutating version of the useDefaults option.
What do you think is the correct solution to problem?
I think that instead of mutating the passed in data, we could set a property on the ajv object with the values, similar to how we do it with errors. Example:
Returning changed data as a separate object requires deep-cloning of the data-structure that is not possible in JavaScript in general case, without restricting what this data can be.
What version of Ajv you are you using?
5.2.2
What problem do you want to solve?
I want a non-mutating version of the
useDefaults
option.What do you think is the correct solution to problem?
I think that instead of mutating the passed in data, we could set a property on the
ajv
object with the values, similar to how we do it with errors. Example:Note: this technique could be applied to filtering and coercing data types as well.
Will you be able to implement it?
Sure thing. With some help understanding doT and why it's used for source code.
The text was updated successfully, but these errors were encountered: