andreypopp / andreypopp/memoize-decorator
Make stored value non-enumerable.
Đang mở
- 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á.