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

alternate cat def merge function #55

Merged
merged 7 commits into from
Oct 29, 2024
Merged

alternate cat def merge function #55

merged 7 commits into from
Oct 29, 2024

Conversation

BirdeeHub
Copy link
Owner

This one is capable of merging duplicate lists together. This allows for defining extensions to existing categories, rather than the only option being to completely replace with a new list

utils.deepmergeCats is the new merge function, used the same way as utils.mergeCatDefs

In addition, module options for categoryDefininions have been slightly changed.

replace still uses mergeCatDefs and merge now uses utils.deepmergeCats

Using replace no longer is what controls if definitions from the package the module was based on are inherited.

Instead, an extra option has been added, to allow you to control the merge strategy used for merging with the existing definitions.

@BirdeeHub BirdeeHub merged commit ba1cd5f into main Oct 29, 2024
@BirdeeHub BirdeeHub deleted the bettermerge branch October 29, 2024 06:17
BirdeeHub added a commit that referenced this pull request Oct 29, 2024
This one is capable of merging duplicate lists together. This allows for defining extensions to existing categories, rather than the only option being to completely replace with a new list

`utils.deepmergeCats` is the new merge function, used the same way as `utils.mergeCatDefs`

In addition, module options for categoryDefininions have been slightly changed.

`categoryDefinitions.replace` still uses `utils.mergeCatDefs` and merge now uses `utils.deepmergeCats`

Using `categoryDefinitions.replace` option no longer is what controls if definitions from the package the module was based on are inherited.

Instead, an extra option has been added, `categoryDefinitions.existing` to allow you to control the merge strategy used for merging with the existing definitions.
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

Successfully merging this pull request may close these issues.

1 participant