bnkamalesh/webgo

View on GitHub
cmd/static/js/sse.js

Summary

Maintainability
A
2 hrs
Test Coverage

Function sse has 40 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const sse = (url, config = {}) => {
  const {
    onMessage,
    onError,
    initialBackoff = 10, // milliseconds
Severity: Minor
Found in cmd/static/js/sse.js - About 1 hr to fix

    Function start has 28 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      const start = () => {
        const source = new EventSource(url);
        const configState = { initialBackoff, maxBackoff, backoffStep, backoff };
    
        source.onopen = () => {
    Severity: Minor
    Found in cmd/static/js/sse.js - About 1 hr to fix

      There are no issues that match your filters.

      Category
      Status