defu icon indicating copy to clipboard operation
defu copied to clipboard

feat: add `defuSchema`

Open ferferga opened this issue 2 years ago โ€ข 6 comments

๐Ÿ”— Linked issue

Fixes #48

โ“ Type of change

  • [X] ๐Ÿ“– Documentation (updates to the documentation, readme, or JSdoc annotations)
  • [ ] ๐Ÿž Bug fix (a non-breaking change that fixes an issue)
  • [ ] ๐Ÿ‘Œ Enhancement (improving an existing functionality like performance)
  • [X] โœจ New feature (a non-breaking change that adds functionality)
  • [ ] ๐Ÿงน Chore (updates to the build process or auxiliary tools and libraries)
  • [ ] โš ๏ธ Breaking change (fix or feature that would cause existing functionality to change)

๐Ÿ“š Description

  • Minor code improvement by using optional chaining as well when checking for merger function
  • Create defuSchema for removing keys not present in the default object

๐Ÿ“ Checklist

  • [X] I have linked an issue or discussion.
  • [X] I have updated the documentation accordingly.

ferferga avatar Aug 27 '23 13:08 ferferga

@pi0 Can I get a review in this please?

ferferga avatar Oct 07 '23 15:10 ferferga

@pi0 Can I get a re-review of this please? Would be realy useful to have this upstream already ๐Ÿ˜…

ferferga avatar Nov 06 '23 10:11 ferferga

Once last thing, it is missing in https://github.com/unjs/defu/blob/main/lib/defu.cjs

pi0 avatar Nov 08 '23 23:11 pi0

@pi0 Done!

ferferga avatar Nov 09 '23 08:11 ferferga

@pi0 Hey sorry for pinging again about this... But it would be really useful to have this upstream!

ferferga avatar Jan 06 '24 00:01 ferferga

@pi0 I fixed the conflicts after the merge of #121

ferferga avatar Jan 10 '24 12:01 ferferga