-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating
Node.js Cookbook - Fifth Edition
By :
There are a number of text conventions used throughout this book.
Code in text: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. Here is an example: “The process.nextTick() callback is executed after the current phase of the event loop is complete but before the event loop moves on to the next phase.”
A block of code is set as follows:
const name = data.toString().trim().toUpperCase();
process.stdout.write(`Hello ${name}!`); When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:
const fs = require('node:fs');
const rs = fs.createReadStream('./file.txt');
const newFile = fs.createWriteStream('./newFile.txt');
rs.map((chunk) => chunk.toString().toUpperCase()).pipe(newFile); Any command-line input or output is written as follows:
$ mkdir interfacing-with-io $ cd interfacing-with-io $ touch greeting.js
Bold: Indicates a new term, an important word, or words that you see onscreen. For example, words in menus or dialog boxes appear in the text like this. Here is an example: “First, we need to locate and click on File system in the left-hand navigation pane.”
Tips or important notes
Appear like this.