The Node.js snippet collection contains JavaScript utilities for Node.js 18.x. It includes helper functions related to server-side code and filesystem operations, while general-purpose helpers can be found in the JavaScript snippet collection.
Create your own static file server with Node.js in just 70 lines of code.
JavaScript, Node · Jun 5, 2022
The Node.js test module is a new testing tool that's still in its early stages. Learn more about it in this short introduction.
JavaScript, Node · Apr 30, 2023
Creates a hash for a value using the SHA-256 algorithm. Returns a promise.
JavaScript, Node · Oct 13, 2021
Learn how semantic versioning works and how to use it to correctly version your software.
JavaScript, Node · Jul 16, 2023
Checks if the given argument is a duplex (readable and writable) stream.
JavaScript, Node · Oct 20, 2020
Gets the command-line arguments passed to a Node.js script.
JavaScript, Node · Apr 26, 2022
Determines if the current runtime environment is Node.js.
JavaScript, Node · Apr 2, 2021
Adds special characters to text to print in color in the console (combined with console.log()
).
JavaScript, Node · Nov 3, 2020
Creates a base-64 encoded ASCII string from a String object in which each character in the string is treated as a byte of binary data.
JavaScript, Node · Sep 15, 2020