Articles tagged in: Node.js



JavaScript Map — Transform to an Object

A previous tutorial showed you how to create a JavaScript Map instance from an existing object. This time we’re doing it the other way around: transforming a JavaScript map into a plain object. {{outline}} Create a JavaScript Object From a Map Modern JavaScript engines ship with the Object.fromEntries( …

Continue Reading

JavaScript Map — Create From Object

The ECMAScript 2015 specification introduced a Map class. A Map instance provides convenient methods around key-value-pairs. Objects in JavaScript are key-value-pairs as well. Yet, you can’t pass an existing object to the map constructor. This tutorial shows you how to create a JavaScript map from an existing object. {{outline} …

Continue Reading

Node.js — How to Touch a File

UNIX-based operating systems have a touch utility available on the command line. touch updates the access and modification times of a given file to the current time. A nice benefit: touch also creates the given file if it doesn’t exist. This tutorial shows you how to implement a touch-like …

Continue Reading

Explore the Library

Find interesting tutorials and solutions for your problems.