marcuswestin / store.js

Cross-browser storage for all use cases, used across the web.
MIT License
14.01k stars 1.33k forks source link

Race conditions #302

Open janat08 opened 4 years ago

janat08 commented 4 years ago

Is it possible to check if a field was rewritten between when a value was retrieved and set? I see the update function doesn't do any of the checking. You could just assign a new Date, on writes, and compare them before settings.

janat08 commented 4 years ago

Does .set use update, or like some underlying core function through which updates go?