31 May 2024, 19:22

@Emil a few "first flic-day" observations on this topic:

  • we're trying to integrate with a GraphQL api and need to turn all our beautiful queries into one-liners. is there no support for 'let', '``', multi-line text, and text substitutions?
    let query = query q1{ heroes(name: ${someName}){ name father{ name } } };

  • is there any async await way of doing web requests without call-back hell? it's like going back to 1998...

  • no fetch?

  • no atob(), no jwt decoding

function isTokenExpired(token) {
if(token==null) return true;
const arrayToken = token.split('.');
const part2 = JSON.parse(new TextDecoder().decode(Duktape.dec('base64', arrayToken[1])));
return Math.floor(new Date().getTime() / 1000) >= part2.sub;
}