andreypopp / andreypopp/memoize-decorator

Make stored value non-enumerable.

Đang mở
#3 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
JavaScript
Star
30
Fork
6
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

The memoized value is currently stored in an enumerable property (`_memoized_xxx`), but this messes up deep equality comparisons. The solutions to this would either be:

* Keep the same property name but set it using `Object.defineProperty` with enumerable set to false.
* Use symbols instead of a magic property name.
* Use WeakMaps, similar to the above.

What do you think?

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.