« first day (4482 days earlier)      last day (471 days later) » 

4:41 AM
When transpiling using Babel is there something you have to do for editors to support IntelliSense? I can import modules from the library just fine, but class properties/methods are highlighted as undefined. Also, JSDocs are kept being added to the transpiled code, but aren't being suggested.
 
5:13 AM
I had been doing some scripting work with Google Sheets. It probably would have been faster if the data was in an SQL database but it was coming from a Google Form. When is it better for data to be in a spread sheet vs a relational database? Are there any scenarios where a spread sheet would be more powerful than a database?
 
5:59 AM
@northerner Useful for prototyping stuff but it doesn't scale well but it is cheap and you have a world class UI for directly modifying the data. I've hear of a lot of NPOs and small goverment offices using Google sheets to collect data from populations and then using a tool like OpenFN to integrate the data into other platforms.
 
6:14 AM
var promise = new Promise(function(resolve, reject) {
    resolve('Learning');
})

promise
    .then(function(successMessage) {
       //success handler function is invoked
        console.log(successMessage);
    }, function(errorMessage) {
        console.log(errorMessage);
    })
Dont we need promise(); ?
to execute it
Ah never mind, I found the answer on the bottom of the tutorial page
"The function passed to new Promise is called the executor. When new Promise is created, the executor runs automatically. "
 
7:02 AM
Encountering something I wasn't expecting -- when requesting an endpoint it responds with an Access Control header which displays in cURL but gets blocked in Chrome. Am I missing something? Is it because it's lower-case? I can't see any obvious issues.
curl 'https://some-endpoint/'
...
< access-control-allow-origin: *
...
{"id":".....
Also odd is on the server-side I was using:

const corsResponse = new Response(response.body, response);
corsResponse.headers.set("Access-Control-Allow-Origin", '*');

To add headers. It seems the Response object that comes from fetch() forces all headers toLower() now? I tried to hack this away by doing

String.prototype.toLowerCase = function() { return this; };

But that had no impact.
 
7:33 AM
I think I'm just doing something wrong with my server side script. When I do the same code for an OPTIONS request it isn't blocked in pre-flight.
Yep. Access-Control-Allow-Headers was missing.

¯\_(ツ)_/¯
 
 
4 hours later…
12:05 PM
@PremRamman promise is not a function. Same as when you do fred = new Person(); you don't need to "execute" fred.
 
 
1 hour later…
1:19 PM
@northerner depends on the scale - in my experience, for small apps you can successfully treat GSheets as a database (a spreadsheet as a DB instance, sheets as tables). You can even get decent read/write speeds if you use the Sheets API instead of what GAS provides. However, for anything substantial you are better off with a proper database
@Nils consider listening for the load event on window - it is fired when all resources on the page finish loading (images included)
 
 
1 hour later…
2:32 PM
@Incognito btw, as defined in the RFC, HTTP header field names are case-insensitive
 

« first day (4482 days earlier)      last day (471 days later) »