$ npm install sw-background-sync-queueQueues failed requests and uses the Background Sync API to replay those requests at a later time when the network state has changed.
npm install --save-dev sw-background-sync-queue
Browse sample source code in the demo directory.
You can find documentation for this module here.