Articles tagged in: Node.js



Node.js — Check If a Directory Is Empty

You want a solid and convenient experience when working with the file system in Node.js. The file system comes with its own challenges, like space limitations and access restrictions. Typically you also need to ensure a given state. For example, you want to delete all files from a given …

Continue Reading

Node.js — Read File Content as String

You may need to read files from a local hard disk in your Node.js project. A typical use case when interacting with files is to read the content as a string. This tutorial shows you how to read a file’s content as a string using Node.js {{outline} …

Continue Reading

How to Allow Trailing Commas (Comma-Dangle) With Typescript-ESLint

ESLint comes with support to require or disallow trailing commas. This option is also known as “comma-dangle”. Trailing commas are supported in JavaScript by ECMAScript v5. Here’s a simple example: const futurestudio = { team: ['Marcus', 'Norman', 'Christian'], } The comma after team: ['Marcus', 'Norman', 'Christian'], is a trailing comma. This tutorial …

Continue Reading

Explore the Library

Find interesting tutorials and solutions for your problems.