Skip to content

Warn if property with the same value is overridden #128

@enkot

Description

@enkot

Describe the feature

In a large project, it is difficult to track/manage when developers specify properties with a value that already exists in the default object. It would be nice to add a warning option if redundant duplication occurs:

const defuFn = createDefu({ 
  warnDuplicates: true
})

On the other hand, I guess it's better not to cause side effects, maybe a callback?

const defuFn = createDefu({ 
  onDuplicate: (object, key, value) => {}
})

Additional information

  • Would you be willing to help implement this feature?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions