v2.1.1
Change log:
-
Add: UNIT TESTS! Implemented with Mocha, Chai and Sinon. They bring stability, predictability and bug-resilience 🐞 The two bugs below are caught by these tests!
-
Add: Public method
getDataUpToDateStatus()
that gives info if the currently cached data is up to date. -
Add: Option to mark data as always up to date by setting
outOfDateAfter
to0
. -
Add: Notes in the README.md for the background sync process logic and the 3 edge cases that prevent network (performance) overhead.
-
Fix: The background sync process, if data was up to date, was not setting the timeout to get fresh data correctly. Initiating the sync intervals was all messed up too.
-
Fix: Make sure
outOfDateAfter
period is not faster than 1 second, for real.