There's currently 34 core modules included in Node:
assert module provides a simple set of assertion tests that can be used to
Prior to the introduction of
TypedArray in ECMAScript 2015 (ES6), the
of binary data. The
Buffer class was introduced as part of the Node.js
API to make it possible to interact with octet streams in the context of things
like TCP streams and file system operations.
Node.js Addons are dynamically-linked shared objects, written in C or C++, that
can be loaded into Node.js using the
, and used
just as if they were an ordinary Node.js module. They are used primarily to
child_process module provides the ability to spawn child processes in
a manner that is similar, but not identical, to popen(3).
A single instance of Node.js runs in a single thread. To take advantage of multi-core systems the user will sometimes want to launch a cluster of Node.js processes to handle the load. The cluster module allows you to easily create child processes that all share server ports.
console module provides a simple debugging console that is similar to the
crypto module provides cryptographic functionality that includes a set of
wrappers for OpenSSL's hash, HMAC, cipher, decipher, sign and verify functions.
Node.js may deprecate APIs when either: (a) use of the API is considered to be unsafe, (b) an improved alternative API has been made available, or (c) breaking changes to the API are expected in a future major release.
dns module contains functions belonging to two different categories:
dns module except
This module is pending deprecation. Once a replacement API has been finalized, this module will be fully deprecated. Most end users should not have cause to use this module. Users who absolutely must have the functionality that domains provide may rely on it for the time being but should expect to have to migrate to a different solution in the future.
Much of the Node.js core API is built around an idiomatic asynchronous event-driven architecture in which certain kinds of objects (called "emitters") periodically emit named events that cause Function objects ("listeners") to be called.
File I/O is provided by simple wrappers around standard POSIX functions. To use this module do
require('fs'). All the methods have asynchronous and synchronous forms.
The HTTP interfaces in Node.js are designed to support many features of the protocol which have been traditionally difficult to use. In particular, large, possibly chunk-encoded, messages. The interface is careful to never buffer entire requests or responses--the user is able to stream data.
HTTPS is the HTTP protocol over TLS/SSL. In Node.js this is implemented as a separate module.
Node.js has a simple module loading system. In Node.js, files and modules are in one-to-one correspondence (each file is treated as a separate module).
net module provides you with an asynchronous network wrapper. It contains
functions for creating both servers and clients (called streams). You can include
this module with
os module provides a number of operating system-related utility methods.
path module provides utilities for working with file and directory paths.
The version of the punycode module bundled in Node.js is being deprecated.
querystring module provides utilities for parsing and formatting URL query strings.
readline module provides an interface for reading data from a Readable
stream (such as
process.stdin) one line at a time.
repl module provides a Read-Eval-Print-Loop (REPL) implementation that
is available both as a standalone program or includible in other applications.
A stream is an abstract interface for working with streaming data in Node.js.
stream module provides a base API that makes it easy to build objects
that implement the stream interface.
There are many stream objects provided by Node.js. For instance, a
request to an HTTP server and
are both stream instances.
string_decoder module provides an API for decoding
Buffer objects into
strings in a manner that preserves encoded multi-byte UTF-8 and UTF-16
timer module exposes a global API for scheduling functions to
be called at some future period of time. Because the timer functions are
globals, there is no need to call
require('timers') to use the API.
The timer functions within Node.js implement a similar API as the timers API provided by Web Browsers but use a different internal implementation that is built around the Node.js Event Loop.
tls module provides an implementation of the Transport Layer Security
(TLS) and Secure Socket Layer (SSL) protocols that is built on top of OpenSSL.
Trace Event provides a mechanism to centralize tracing information generated by V8, Node core, and userspace code.
Tracing can be enabled by passing the
--trace-events-enabled flag when starting a
tty module provides the
In most cases, it will not be necessary or possible to use this module directly.
dgram module provides an implementation of UDP Datagram sockets.
url module provides utilities for URL resolution and parsing.
util module is primarily designed to support the needs of Node.js' own internal APIs. However, many of the utilities are useful for application and module developers as well.
v8 module exposes APIs that are specific to the version of V8 built into the Node.js binary.
Note: The APIs and implementation are subject to change at any time.
vm module provides APIs for compiling and running code within V8 Virtual Machine contexts.
Note: The vm module is not a security mechanism. Do not use it to run untrusted code.
zlib module provides compression functionality implemented using Gzip and