medikoo / es6-weak-map

WeakMap collection as specified in ECMAScript6
ISC License
29 stars 7 forks source link

Consider override of native ES5 functions #3

Open medikoo opened 9 years ago

medikoo commented 9 years ago

As other weak-map project does.

It will assure that WeakMap polyfill works also for non extensible objects

mxdubois commented 7 years ago

Hey @medikoo, would you still consider doing something like this?

I'd love to use memoizee/weak but seem to bump up against this everytime I try since devs in my team are working with React's frozen props objects and occasionally seamless-immutable objects.

medikoo commented 7 years ago

@mxdubois definitely, and I plan to look into it within next 2 weeks.

Still the idea is to make it slightly simpler (and less invasive) than in mentioned weak-map. We will provide an optional override to Object.freeze etc., which will have to be loaded upfront if someone wants to ensure that weak map can work on frozen or non-extensible objects.

phated commented 7 years ago

@medikoo I really like that solution. I was worried resolution of this issue would collide with my work in gulp but it seems like it will be fine.