Multiple return values from multiple promises
Let’s assume we want to retrieve some data from an API and show it together with the original data. For instance, I’ll use the DuckDuckGo API to find capital names for countries.
…Let’s assume we want to retrieve some data from an API and show it together with the original data. For instance, I’ll use the DuckDuckGo API to find capital names for countries.
…VS Code itself is awesome, but some extensions add more magic to it :). I like adding new extensions (then forgetting I have them or how to use them), and there are some that I would like to share with. So below is the list of my VS Code extensions that help developing both the front-end and the back-end.
…Sometimes I create pages with minimal interaction and amount of JavaScript – for instance, with a hamburger menu, toggle or tabs. They require simple yet repetitive JavaScript code. There are nice big components or frameworks that solve this problem (like Bootstrap, React, Vue), but the problem is their size and often a complexity to set up. Recently (in November 2019), a new library emerged – Alpine.js.
Read moreI don’t want to create a guide on the declaration files but only share some tips: what is an ambient declaration, what’s specific about ambient namespaces and what is the result of using ambient namespaces.
…When installing packages to a Node.js project, many people stick with the default npm. Many people also use its alternative, yarn, but few know about more uncommon ones like pnpm or dry.
…Most of my Node.js projects require some build routine. As a fan of minimalism, for simple builds I used to write short scripts operating directly on fs
. In order to avoid duplication and simplify the process for future, I created a simple npm package. I described the required steps below.
There are many frameworks for testing a Node.js project. Too many. And most of them require huge dependencies. Check the brief report below to find out.
…For simple build tasks in Node.js I use a custom script. Let’s consider the following requirements:
dist
and dist/assets
folders.dist/background-dist.js
.assets/*.png
files to dist/assets/
.While trying to enhance a Chrome plugin that translates text on pages (GitHub), I wanted to show two translations at once – of the pointed word and of the entire sentence or paragraph. Technically it was not hard except for the part of retrieving two translation results and displaying them in one popup.
…Below is a brief list of steps to perform to create and use SSH keys in Git Bash and Visual Studio Code or Community.
…