Skip to content

deepmerge in defaultSchmea merge function #49

@maloguertin

Description

@maloguertin

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions