Coder Social home page Coder Social logo

ubports-api-node-module's People

Contributors

dependabot[bot] avatar flohack74 avatar gsilvapt avatar ingo-fp-angel avatar mariogrip avatar neothethird avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

ingo-fp-angel

ubports-api-node-module's Issues

Code quality - Possible unreachable statement

I would like to discuss the possibility of an unreachable statement in the http module:

class HttpApi {
  constructor(options) {
    if (options) {
...
    }
// What I'm interested in discussing:
    if (!this.host)
      throw Error("Host option is required.");
  }

This is line 38 of the file. When can this be reached if there no possibility of creating an empty HttpApi object? Even when we do new HttpApi({host: ""}) it will return the previous error defined with invalid host url.
If you can help me understand when this if statement is reached, I can potentially add one more test to it to make sure this line is covered.

Thanks in advance for your help.

Allow specifying an array of redundant sources

We just had an unnoticed multiple-hour-long outage of the api that broke the installer and devices page. We could mediate that risk by allowing to specify an array of alternative data sources.

getDeviceSelects should order entries alphabetically

Someone posted a screenshot of the UT installer with the selectable devices list expanded in the German UT telegram group.
And with 14 unsorted elements it's already now a little inconvenient to find the correct entry.

I'd prefer that list to be ordered alphabetically.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.