Skip to content

feat(micro-utilities): add object.omit to replacements - #1226

Merged
43081j merged 2 commits into
e18e:mainfrom
maksimgm:feat/object-omit
Nov 20, 2026
Merged

43081j merged 2 commits into
e18e:mainfrom
maksimgm:feat/object-omit

Conversation

@maksimgm

@maksimgm maksimgm commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

🔗 Linked issue

closes #1200

📚 Description

maps object.omit to the existing snippet::object-exclude.

checked it against object.omit@3.0.0 on random objects and the output matched. the only exception: objects with their own constructor property. the package returns {} for those (its is-plain-object check fails), and the snippet does what you'd expect.

@43081j

43081j commented Nov 15, 2026

Copy link
Copy Markdown
Contributor

We already have an entry for "object-exclude" or something along those lines.

@maksimgm

Copy link
Copy Markdown
Contributor Author

good catch, switched it to snippet::object-exclude and dropped the new one

@dreyfus92 dreyfus92 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good, besides the constructor case, class instances and null-prototype objects also return {} with the package, and a single string key has to become an array now, but none of that seems like a blocker 👍

@maksimgm

Copy link
Copy Markdown
Contributor Author

thanks! yeah the class instance and null-prototype ones come from the same is-plain-object check as the constructor case, and a single key just needs wrapping in an array. left the snippet as is since it's the shared one

@43081j
43081j merged commit a0b2e00 into e18e:main Nov 20, 2026
5 checks passed
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.

[Replacement]: object.omit

3 participants