conveyal/modeify

View on GitHub
client/components/rauchg/ms.js/0.7.0/index.js

Summary

Maintainability
A
2 hrs
Test Coverage

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

function parse(str) {
  var match = /^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(str);
  if (!match) return;
  var n = parseFloat(match[1]);
  var type = (match[2] || 'ms').toLowerCase();
Severity: Minor
Found in client/components/rauchg/ms.js/0.7.0/index.js - About 1 hr to fix

    Avoid too many return statements within this function.
    Open

      return ms + 'ms';
    Severity: Major
    Found in client/components/rauchg/ms.js/0.7.0/index.js - About 30 mins to fix

      There are no issues that match your filters.

      Category
      Status