ubports / ubports-api-node-module Goto Github PK
View Code? Open in Web Editor NEWAccess the various UBports APIs from nodejs
Access the various UBports APIs from nodejs
We share so much with the system-image module, it'd be a good idea to merge these. See ubports/system-image-node-module#19
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.
JSDoc blocks should be added to all our functions.
Properly detect timeouts! Allow to specify timeout time.
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.
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.