Explore tens of thousands of sets crafted by our community.
Node.js Core Modules
25
Flashcards
0/25
events
The 'events' module provides the EventEmitter class used for handling events. Example: const EventEmitter = require('events');
net
The 'net' module provides an asynchronous network API for creating stream-based TCP or IPC servers and clients. Example: const net = require('net');
stream
The 'stream' module is used to handle streaming data in Node.js. Example: const stream = require('stream');
zlib
The 'zlib' module provides compression and decompression functionalities. Example: const zlib = require('zlib');
url
The 'url' module provides utilities for URL resolution and parsing. Example: const url = require('url');
fs
The 'fs' module provides an API for interacting with the file system. Example: const fs = require('fs');
vm
The 'vm' module enables compiling and running code within V8 Virtual Machine contexts. Example: const vm = require('vm');
assert
The 'assert' module provides a simple set of assertion tests. Example: const assert = require('assert');
dns
The 'dns' module provides functionalities to do name resolution. Example: const dns = require('dns');
buffer
The 'buffer' module provides a way of handling streams of binary data. Example: const Buffer = require('buffer').Buffer;
process
The 'process' object is a global that provides information about, and control over, the current Node.js process. Example: Accessing process does not require require(), it's available globally as process.
string_decoder
The 'string_decoder' module provides an API for decoding buffer objects into strings. Example: const StringDecoder = require('string_decoder').StringDecoder;
querystring
The 'querystring' module provides utilities for parsing and formatting URL query strings. Example: const querystring = require('querystring');
util
The 'util' module is designed to support the needs of Node.js's internal APIs. Example: const util = require('util');
child_process
The 'child_process' module is used to spawn new processes. Example: const { spawn } = require('child_process');
module
The 'module' system in Node.js helps in organizing the code into separate units. Example: module.exports is the object that's actually returned as the result of a require call.
cluster
The 'cluster' module allows you to easily create child processes that run concurrently and share the same server port. Example: const cluster = require('cluster');
crypto
The 'crypto' module provides cryptographic functionality including a set of wrappers for OpenSSL's hash, hmac, cipher, decipher, sign and verify functions. Example: const crypto = require('crypto');
timers
The 'timers' module provides global functions for scheduling functions to be called later at some time. Example: setTimeout and setInterval are globals provided by the timers module.
os
The 'os' module provides utilities related to the operating system. Example: const os = require('os');
tls
The 'tls' module provides a secure counterpart to the net module, implementing TLS/SSL protocols. Example: const tls = require('tls');
path
The 'path' module provides utilities for working with file and directory paths. Example: const path = require('path');
http
The 'http' module allows Node.js to transfer data over the Hyper Text Transfer Protocol (HTTP). Example: const http = require('http');
readline
The 'readline' module provides an interface for reading data from a Readable stream (such as process.stdin) one line at a time. Example: const readline = require('readline');
repl
The 'repl' module provides a Read-Eval-Print-Loop implementation that is accessible from the command line or programmatically. Example: const repl = require('repl');
© Hypatia.Tech. 2024 All rights reserved.