Articles tagged in: Node.js



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

Node.js — Check If a Path Is a File

When interacting with the local hard disk, you may need to check whether an existing path is a file or a directory. Node.js comes with the fs core module providing dozens of useful low-level methods to interact with the hard disk. This tutorial shows you how to compose an …

Continue Reading

Explore the Library

Find interesting tutorials and solutions for your problems.