25 posts tagged with “javascript

Excluding node_modules in TSLint

March 18, 2019

Personally I think TSLint shouldn't look at anything inside of node_modules by default, however this is not the case out-of-the-box. For…

Update OR Create function for Sequelize

March 18, 2019

A lot of times when creating records in a database, we'd like to know whether the record already existed, or at least partially did, and now…

Implementing an Express middleware function to be called after route responses

February 06, 2019

This is needed in cases where you're looking to collect some data after a request was processed, whether it's simple logging, or collecting…

Making HTTP requests in Javascript using Fetch

February 02, 2019

Making HTTP requests is what many struggle with starting out with Javascript. There are many alternatives to use. In this article we…

What is "use strict" in Javascript?

January 31, 2019

Use strict is a feature introduced in ES5, where adding the string "use strict" to a context in your JS code will opt it into a stricter…

How to check if an element in hidden in Javascript

January 30, 2019

This question is commonly asked around the web. In many cases with complex UIs you'd like to know if an element is currently hidden or…

10 useful Lodash array functions

January 29, 2019

When working with a lot of data, in many cases you're looking to perform complex operations on arrays of records. This is where Lodash comes…

Getting timestamps in Javascript

January 28, 2019

Timestamps are great to use when trying to avoid the differences in timezones and such. Now in Javascript, support for certain date related…

Programmatically click on an element in Javascript

January 23, 2019

In many situations you need to simulate a click on an element. Many times this is useful in testing, where you'd need to simulate a click…

How to redirect to another page in Javascript

January 21, 2019

This question often comes up, and people are usually wondering whether jQuery is needed for redirecting to a different page. The answer…

Removing Array Duplicates in ES6

January 19, 2019

There are many ways to remove duplicates from an array in Javascript, but ES6 specifically offers some interesting and functional methods…

Using Fragments in React

January 18, 2019

When rendering multiple adjacent elements in React, you usually get an error saying "Adjacent JSX elements must be wrapped in an enclosing…

React States & Asynchronous Callbacks

January 17, 2019

We all love the concept of the React state! You can trigger updates on data that are part of the scope of your component, and that'll…

Flattening Arrays in Javascript Recursively

January 16, 2019

In many cases when processing data you would need to flatten the final result, specially when using promises and resolving multiple pieces…

Shuffling an Array in Javascript

January 14, 2019

There are many ways to shuffle an arrays. Various algorithms offer different levels of performance, and specially bias! Here's a quick…

AuthGuards in React

January 12, 2019

What is an AuthGuard? An AuthGuard in Angular is there to make sure that certain conditions are met for your route to render, and if not…

Javascript ES6 Generator Functions

January 12, 2019

What does the “yield” keyword do? What is the use of the yield keyword? What does it do? Yield and Generator functions Generator functions…

Map, filter & reduce in Javascript

January 11, 2019

Functional programming focuses heavily on lists and list operations. Within these operations 3 functions are very popular and re-used in…

Chaining Promises in Javascript

January 09, 2019

We all know about the callback-hell phenomena in Javascript. Usually in backend processes we are retrieving and comparing data from…

Fixing Webpack Error "Cannot find module WebpackOptions.json"

January 08, 2019

Using a tool with as many moving parts as webpack can come with its own headaches; mismatched versions of loaders, missing configurations…

Customize Storybook Using the Options Addon

January 07, 2019

Storybook is a great way to showcase your web components, and comes with many useful add-ons, among which is the options add-on which is a…

Send SMS Messages using Twilio's API in Javascript

January 06, 2019

Twilio is a popular platform for sending & receiving SMS/MMS messages. Twilio's easy to use APIs make on-demand messaging real fun! Before…

Classes in Vanilla Javascript

January 05, 2019

Constructor: Class Methods: Test the class:

Convert querySelectorAll NodeList to Array

January 03, 2019

There are multiple ways to make a iterable: Most browser-compatible method: Array.from alternative (not compatible with IE): ES6 Method:

Quick & Easy HTTP Requests Using Axios

January 03, 2019

Run: GET Request: POST Request: More Examples on the Axios repo

Browse all tags