1.0.2 • Published 11 years ago

backo2 v1.0.2

Weekly downloads
5,508,160
License
MIT
Repository
github
Last release
11 years ago

backo

Simple exponential backoff because the others seem to have weird abstractions.

Installation

$ npm install backo

Options

  • min initial timeout in milliseconds 100
  • max max timeout 10000
  • jitter 0
  • factor 2

Example

var Backoff = require('backo');
var backoff = new Backoff({ min: 100, max: 20000 });

setTimeout(function(){
  something.reconnect();
}, backoff.duration());

// later when something works
backoff.reset()

License

MIT

subscriptions-transport-ws@texelz/subscriptions-transport-ws@arisageha/react-lazyload@arisageha/react-lazyload-fixnativescript-subscriptions-transport-wssubscriptions-transport-uws-sarafanfm@medibloc/subscriptions-transport-wseni-chat@tf2autobot/socket.io-clientwscio@infinitebrahmanuniverse/nolb-backo@mrtujiawei/sdk-yxim-web@everything-registry/sub-chunk-1210web-component-tester-bundlevue-infinite-loading-propswxmp-socket.io-clientwx-apollo-subscription-clientwighawag-subscriptions-transport-wswxapp-socket-iowxapp-socket.io-clientsubscription-clientswitch-socket.io-clientvcloudcam-playkit-js-hlsvideo-multi-uploadervue-dev-clone@drpc/client@coremail/socket.io-clientjeuxuika-flow.jsjsonrpc2-wsklndlkasnfnlasnfl3.0.0subscriptions-transport-custom-wssubscriptions-transport-ws-acksubscriptions-transport-ws-rollupsubscriptions-transport-ws-tempsubscriptions-transport-ws-unsubscribe-fixsubscriptions-transport-ws-authysubscriptions-transport-ws-dotansubscriptions-transport-ws-envelopsubscriptions-transport-ws-fork-mxstbrsubscriptions-transport-ws-hally9ksubscriptions-transport-ws-no-warningsubscriptions-transport-ws-racesse.io-clientstock-ticker-react-widgettest-build-socket.io-clienttoyako@asiz33/smartblok-vendure-plugin@alta-ng-timeago/hiamtanh-alta@ccms/websocket@cdevine49/react-numeric-input@acklo/node-sdk@8base/subscriptions-transport-ws@boundless-inc/mobiledoc-dom-renderer@depyronick/socket.io-client.ng10-fix@dfuse/subscriptions-transport-wswc-starterkitvchat@httptoolkit/subscriptions-transport-ws@hiveteams/subscriptions-transport-ws@future-standard/subscriptions-transport-ws@glennholland/subscriptions-transport-ws@livechat/saga-utils@ngxvoice/ngx-voicelistner@enounca/socket.io-client@engrjabi/subscriptions-transport-ws@k4connect/socket.io-client@kcerb/socket.io-client@kamilkisiela/subscriptions-transport-ws@jonny/socket.io-client@holytiny/wxmp-socket.io-client@indiebackend/client-sdk@inesfidalgo/forge@moony-engineering/messageclient@scottyfillups/subscriptions-transport-ws@onmoon/react-sdk@plecong/homebridge-dkncloudna@paar-it-gmbh/acme-client@soyjak/utils@seculum/vue-dev-clone@shopify/legacy-apollo-subscriptions-transportmsign-net-iomx-socket.io-clientmpd-parser-1mp-socket.io-clientmkit-net-iomiguelcostero-ng2-toastynacmenydusnydus-clientrelay-transport-wsreactwebpusherreact-native-socket.io-clientneeds-mpvue-pomeloneotracker-client-webng-search-dropdownnode-socket-clientpersisted-subscriptions-transport-wsplaykit-js-hls-sondq
1.0.2

11 years ago

1.0.1

11 years ago