Blog

It's a Wonderful Life

The Difference Between Width and Flex Basis

The Difference Between Width and Flex Basis

How to make the vscode title bar show full file path

“I know that the path is displayed when I hover on the filename on the tab just above the code, but this means mucking about with the mouse when I am keyboarding, and is therefore a real nuisanc...

Node.js setImmediate()

When you want to execute some piece of code asynchronously, but as soon as possible, one option is to use the setImmediate() function provided by Node.js:

Parsing JSON with Node.js

If you have JSON data as part of a string, the best way to parse it is by using the JSON.parse method that’s part of the JavaScript standard since ECMAScript 5, and it’s provided by V8, the Ja...

How to write a JSON object to file in Node.js

Sometimes the best way to store some data in a Node.js application is to save it to the filesystem.

How to use MongoDB with Node.js

We’ll be using the official mongodb npm package. If you already have a Node.js project you are working on, install it using

How to fix the "Missing write access" error when using npm

The first time you try to install a package globally using npm, using the syntax npm install -g <package> on a Mac, or Linux, you might get a weird error, saying something like

Implementing a password input component

To implement a 6-digit password input component, first you will need a hidden input tag hiding behind, this input will not be able to be seen, you can achieve this simply by giving it 0 value for b...

JavaScript Type Conversions

Even if JavaScript is a loosely typed language, you might have the need to convert a value from a type to another.

The JavaScript delete Operator

The delete JavaScript operator is used to delete a property from an object.