The Node.js snippet collection contains JavaScript utilities for Node.js 14.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.
JavaScript, Node
Creates a hash for a value using the SHA-256 algorithm. Returns a promise.
JavaScript, Node
Generates a UUID in Node.JS.
JavaScript, Node
Checks if the given argument is a duplex (readable and writable) stream.
JavaScript, Node
Checks if the given argument is a writable stream.
JavaScript, Node
Checks if the given argument is a readable stream.
JavaScript, Node
Gets the command-line arguments passed to a Node.js script.
JavaScript, Browser
Determines if the current runtime environment is a browser so that front-end modules can run on the server (Node) without throwing errors.
JavaScript, Node
Writes a JSON object to a file.
JavaScript, Node
Adds special characters to text to print in color in the console (combined with console.log()
).
JavaScript, Node
Determines if the current runtime environment is Node.js.
JavaScript, Node
Checks if the given argument is a stream.
JavaScript, Node
Returns an array of lines from the specified file.
JavaScript, Node
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
Checks if the current process's arguments contain the specified flags.
JavaScript, Node
Did you know you can use Chrome Developer Tools to debug your Node.js code? Find out how in this short guide.