Code with Hugo: JS & Node.js in Prod logo

Code with Hugo: JS & Node.js in Prod

Subscribe
Archives
August 20, 2019

ES6 Array Unique/Dedupe with Sets - Code with Hugo - Aug 20th 2019

Hot off the press

JavaScript ES6 Array remove duplicates/get unique values in-depth with Set and spread/iterables: With ES6, more developers should be leveraging built-ins than are using lodash functions. Here is an ES6 implementation of lodash/underscore’s uniq: const dedupe = list => […new Set(list)]; This post goes through the how and why this works.

If you missed it

Yarn Workspaces: monorepo management without Lerna for applications and coding examples: How to use Yarn Workspaces to manage applications/coding examples.

Jest Full and Partial Mock/Spy of CommonJS and ES6 Module Imports: The example repository is available at github.com/HugoDF/mock-spy-module-import.

Jest ignore or exclude file/function/statement from test coverage: In computer science, test coverage is a measure used to describe the degree to which the source code of a program is executed when a particular test suite runs.

From the web

What I Like About Vue: Over the past six months I’ve had the opportunity to work on a simple PWA using Vue. To speed up the learning curve we brought in Eduardo San Martin Morote, a Vue core contributor, to help us on the project.

Some items from my “reliability list”: It should not be surprising that patterns start to emerge after you’ve dealt with enough failures in a given domain. I’ve had an informal list bouncing around inside my head for years.

How Stack Overflow upgraded from Windows Server 2012 by Taryn Pratt: Warning: This post is long. While working through this massive server upgrade/migration process, tears were shed, many cuss words were uttered, along with a general feeling of frustration, which ultimately culminated into extreme happiness once the migration was completed.

How (not) to sign a JSON object by : Last year we did a blog post on interservice auth. This post is mostly about authenticating consumers to an API. That’s a related but subtly different problem: you can probably impose more requirements on your internal users than your customers.

Don't miss what's next. Subscribe to Code with Hugo: JS & Node.js in Prod:
Powered by Buttondown, the easiest way to start and grow your newsletter.