sodiray / radash

Functional utility library - modern, simple, typed, powerful
https://radash-docs.vercel.app
MIT License
4.19k stars 167 forks source link

fix(object): fixed `pick` not working when the target object is proxified or has its own `hasOwnProperty` method overwritten #295

Closed UnKnoWn-Consortium closed 1 year ago

UnKnoWn-Consortium commented 1 year ago

Description

fix(object): fixed pick not working when the target object is proxified or has its own hasOwnProperty method overwritten

P.S. I have chosen to use Object.prototype.hasOwnProperty.call instead of the static Object.hasOwn because the latter method is not added to NodeJS until 16.9.0 and I don't want to bother with polyfill.

Checklist

Resolves

Fixed #276

vercel[bot] commented 1 year ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
radash-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 26, 2023 5:01pm
mmiha05 commented 1 year ago

Does it make sense to have test for this case?

UnKnoWn-Consortium commented 1 year ago

@mmiha05 You are right. Tests are now added.