All Firebase SDKs handle intermittent connectivity loss: they keep the data in memory and when the connection to the back-end is restored, they send any pending writes and update the local cache.
The Firebase SDKs for iOS and Android also support disk persistence. This means they write recently downloaded data (and pending writes) to disk, and re-read them from there when the app restarts.
JavaScript clients (including the Admin SDK for Node.js) only support the intermittent connectivity loss. They don't have a disk based persistence mechanism, although somebody is working on it now that the SDK is open-sourced.
Also see: Does Firebase JavaScript API catch-up with server when re-connected