Checks your battery with battery api.
Basically it's the result of playing with js
There's two part to this project.
It uses a promise and tries to fetch data from two sources(one from external api, another from local json).
It then shows the data whichever is returned first(using
promise.all ). Clearly the localone should be faster.
This ones pretty simple. Uses native battery api which returns a promise.
If the browser doesn't support the battery api, it'll show an error.