lgaticaq/codigo-postal

View on GitHub
src/index.js

Summary

Maintainability
A
3 hrs
Test Coverage
A
100%

Function getZip has 59 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const getZip = data => {
  return new Promise((resolve, reject) => {
    const qs = querystring.stringify({
      _cl_cch_codigopostal_portlet_CodigoPostalPortlet_INSTANCE_MloJQpiDsCw9_comuna:
        data.commune,
Severity: Major
Found in src/index.js - About 2 hrs to fix

    Function req has 30 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        const req = https.request(options, res => {
          if (res.statusCode !== 200) {
            reject(new Error(`Request Failed. Status Code: ${res.statusCode}`))
          } else {
            res.setEncoding('utf8')
    Severity: Minor
    Found in src/index.js - About 1 hr to fix

      There are no issues that match your filters.

      Category
      Status