Upgrade Husky to Latest Version

In this post, I’ll show you how to upgrade from Husky - Git hooks v4.x to v5.x. The motivation to write about that is because I made this upgrade on some of my projects and I think this short post can be helpful to you. At the moment I’m writing this post the current version of Husky is v5.1.1, I’ll keep this version of the package to avoid configuration problems when we are reading this post....

February 26, 2021 · 2 min · Helder Burato Berto

How to Implement Stack Data Structure in JavaScript

On this article, I’ll show how to implement Stack data structure in JavaScript focusing on how simple it is and how it works. What is Stack? It’s a data structure based on the principle LIFO (Last In First Out), which means the last item in will be the first item out of Stack. The items recently added to Stack are located near the top and the oldest near the bottom of Stack....

December 6, 2020 · 3 min · Helder Burato Berto

How to Avoid Array Mutation

In this article, I’ll focus on showing how to add, edit and remove items in an array causing mutation and non-mutation ways. Some things we need to keep in mind when writing code avoiding mutation is to return a new one after the update. It’s a common approach when working with functional programming and if you want to understand some concepts of functional programming I recommend you read this article I wrote some time ago....

April 2, 2020 · 4 min · Helder Burato Berto

Understanding concepts of functional programming with JavaScript

Let’s understand the fundamental concepts of functional programming using JavaScript language. The abbreviation FP will be used within this article to reference functional programming. Object Example In this article we’ll use the following object in our practical examples like the following: const animals = [ { name: "Max", species: "dog", likes: ["bones", "carrots"], }, { name: "Teodore", species: "cat", likes: ["mice", "carrots"], }, ]; What is functional programming? FP is the basis in Lambda Calculus - a formal system developed in the 1930s....

February 3, 2020 · 3 min · Helder Burato Berto

Exploring the bind method in JavaScript

In this article we will cover the “bind” functionality that makes up the JavaScript language. Introduction The main purpose of the bind method is to change the this context of a function independent of where it is being called. It’s very common the transformation of this occurs as new method calls are made and that a certain value is expected for our this context however we are faced with a this many times unexpected or undefined....

June 24, 2019 · 3 min · Helder Burato Berto