Commit Graph

11 Commits

Author SHA1 Message Date
Johannes Meyer 0f16e20d92 storage.js: Write `null` instead of `undefined` to the storage
`undefined` causes the key to be ignored by JSON.stringify
2019-07-17 13:12:41 +02:00
Johannes Meyer 383895fd92 storage.js: Pass the value to event subscribers of StorageAwareMap 2019-07-17 13:12:41 +02:00
Johannes Meyer 8937e11a09 storage.js: Properly handle if keys are entirely removed 2019-07-17 13:12:41 +02:00
Johannes Meyer 363486277b storage.js: Rename Storage.subscribe to onChange 2019-07-17 13:12:41 +02:00
Johannes Meyer c5beabf891 storage.js: Cleanup `StorageAwareMap` key corpses after 90 days 2019-07-17 13:12:41 +02:00
Johannes Meyer cbd1e1bb92 storage.js: Drop `StorageAwareSet` and replace it with `StorageAwareMap` 2019-07-17 13:12:41 +02:00
Johannes Meyer 8377a2d096 storage.js: Don't use .bind() to define a callbacks context 2019-07-17 13:12:41 +02:00
Johannes Meyer 03fc052749 storage.js: Directly use scope `window` to access `localStorage` 2019-07-17 13:12:41 +02:00
Johannes Meyer 95dee43f5b storage.js: Just use a factory to create behavior storages 2019-07-17 13:12:41 +02:00
Johannes Meyer 3b7a1a5ab4 storage.js: Add method `on` to `StorageAwareSet` 2019-07-17 13:12:41 +02:00
Johannes Meyer e2cddc2d46 js: Introduce storage.js, a localStorage abstraction layer 2019-07-17 13:12:41 +02:00