Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
constructor(options) {
this.client = getCozyClientFromOptions(options)
this.subscriptions = new SubscriptionList()
this.retryManager = new RetryManager({
raiseErrorAfterAttempts,
timeBeforeSuccessful,
baseWaitAfterFirstFailure,
maxWaitBetweenRetries
})
this.retryManager.on('error', err => this.emit('error', err))
this.bindEventHandlers()
if (isCordova() && !hasNetworkInformationPlugin()) {
logger.warn(
`This seems a Cordova app and cordova-plugin-network-information doesn't seem to be installed. Please install it from https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-network-information/ to support online and offline events.`
)
}
}