• Home
  • Books
  • Node
  • Testing
  • JavaScript
  • More...
  • Search
  • About
  • Gear & Setup

ES6

A collection of 7 posts

#javascript #es6 #data structures

JavaScript remove duplicates, get unique/distinct values from Array with ES6+ Set and spread

With ES6+, more developers should be leveraging built-ins than are using lodash functions. This post will go through how to remove duplicates ie. get distinct/unique values from an Array using ES6 Set. This gives you a one-line implementation of lodash/underscore’s uniq fu ...

  • Hugo Di Francesco
    Author
4 min read
#javascript #jest #node #es6 #testing

Jest Full and Partial Mock/Spy of CommonJS and ES6 Module Imports

JavaScript import/require module testing do’s and don’ts with Jest The example repository is available at github.com/HugoDF/mock-spy-module-import. This post goes through how to achieve different types of module mocking scenarios with Jest. From simple Import interce ...

  • Hugo Di Francesco
    Author
13 min read
#micro #node #javascript #es6 #architecture

Simple, but not too simple: how using Zeit’s `micro` improves your Node applications

Leave the Express comfort zone to expand how you think about Node application architecture. tl;dr using a function composition model for building HTTP servers is awesome Functions as a Service are great but have some drawbacks micro has a similar, simple API to FaaS but doesn&rs ...

  • Hugo Di Francesco
    Author
7 min read
#node #javascript #es6

Use ES modules/ES6 import in Node without Babel/Webpack using `esm`

Node has been implementing more and more ES6+ (ESNext) features natively. One of the features that is taking the longest to implement is modules. The reason for this is that Node and npm run on what is called CommonJS, with which you use require('module-name') to import from othe ...

  • Hugo Di Francesco
    Author
3 min read
#javascript #es6 #interview #functional programming

Impress interviewers with recursion in JavaScript with ES6 features

There’s nothing as flashy and useful for JavaScript interviews than recursion. If you just want to be impressive with recursion in JavaScript, here are some semi real-world (technical test type) examples. The short definition of a recursive solution to a problem (in computer sci ...

  • Hugo Di Francesco
    Author
4 min read
#node #javascript #es6

Why you should wrap your (JavaScript) dependencies

An email sending example. ...

  • Hugo Di Francesco
    Author
2 min read
#javascript #es6 #web development

Recursion in JavaScript with ES6, destructuring and rest/spread

The latest ECMA standard for JavaScript (ECMAScript 6) makes JavaScript more readable by encouraging a more declarative style with functional constructs and new operators. ...

  • Hugo Di Francesco
    Author
6 min read
Page 1 of 1 

Interested in Alpine.js?

Power up your debugging with the Alpine.js Devtools Extension for Chrome and Firefox. Trusted by over 15,000 developers (rated 4.5 ⭐️).

Install Now close
Code with Hugo
Latest Posts Github