Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deepmerge in defaultSchmea merge function #49

Open
maloguertin opened this issue Nov 22, 2018 · 0 comments
Open

deepmerge in defaultSchmea merge function #49

maloguertin opened this issue Nov 22, 2018 · 0 comments

Comments

@maloguertin
Copy link

maloguertin commented Nov 22, 2018

In defaultSchema merge function you have:

const merged = merge({}, this, ...schemas)

is there a reason for using lodash' deepMerge instead of a simple reduce:

const merged = schemas.reduce((merged, schema) => ({...merged, ...schema}), this)

Using lodash merge makes it incredibly slow with a lot of refs to other schemas and even worse if you want to use self referencing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant