Node.js
Features in node.js (v 17.9.1)
Node.js is used to run server side javascript, where what you written would be hidden to end user unlike browser based javascript. along with writing REST apis the node.js will alow many other features. Below is the list of features the Node.js have
Assertion testing -- This module provide set of assertion functions to write test cases
Asynchronous context tracking -- These classes are used to associate state and propagate it throughout callbacks and promise chains. They allow storing data through out the lifetime of a web request or any asynchronous duration
Async hooks -- It will provide module to track asynchronous resources
Buffer -- Buffer objects are used to represent a fixed-length sequence of bytes. Many node.js apis support buffers, it is a subclass of Uint8Array, though buffer class available in global scope it is still recommended to import explicitly
C++ Addons -- Addons are dynamically-lined shared objects written in C++. The require can load C++ addons as ordinary Node.js modules. These addons provide interface to communicate between Javascript and C++ libraries
Node-API (formerly N-API) -- The Node-API is independent from underlying Javascript runtime the V8, it is implemented as part of Node,.js itself. It is intended to insulate addons from changes in the underlying Javascript engine and allow modules for one major version to run on later major version of Node.js
C++ embedder API -- Node.js provides many C++ APIs that can be used to execute Javascript in a Node.js env from other C++ softwares
Child processes -- The child_process module provides the ability to spawn subprocesses in a manner that is similar, but not identical, to popen(3). i.e, it opens a process by creating a separate process
Cluster -- The clusters of Node.js processes can be used to run multiple instances of Node.js
Command-line Api -- Node.js comes with a variety of CLI options. These options expose built-in debugging, multiple ways to execute scripts, and other helpful runtime options.
Console -- The console module provides a simple debugging console that is similar to the browser console
Corepack (Experimental) -- Corepack is an experimental tool to help with managing version of your package managers. This will allow to use package mangers without installing them explicitly
Crypto -- The crypto module provides cryptographic functionalities for the popular algorithms
Debugger -- Node.js includes a command-line debugging utility.
Deprecated APIs -- The list of deprecated apis due to unsafe, or improved alternate available, or breaking changes are expected in future
Diagnostics Channel -- The diagnostics_channel module provides an API to create named channels to report arbitary message data for diagnostics purpose
DNS -- The dns module enables name resolution. For example use it to lookup IP address of host names
Domain (Soon going to deprecate) -- When a node.js app run in cluster, domains provide a way to handle multiple different IO operations as a single group. If an event subscribed to domain, when error thrown the domain object will be notified rather than losing the context of the error in the process.
Errors -- Node.js will generally experience 4 kind of errors 1) Standard Javascript errors 2) System errors 3) User-specified errors (Code errors) 4) AssertionErrors all these kind of error handling can be done with this module
Events -- Most of the Node.js core API is built around an idiomatic asynchronous event-driven archtecture, this module help emit /broadcast events and subscribe to them and do action.
File system -- The Files system module allow to handle files and folders through node.js
Globals -- This module will provide list of variables, methods that are globally available.
HTTP -- This module will handle http server and client and support wide range of protocalls
HTTP/2 -- The http2 module provides an implementation of the HTTP/2 protocol.
HTTPS -- This module is to handle http over TLS/SSL layer.
Inspector -- The inspector module provides an API for interacting with the V8 inspector
Internationalization -- Node.js uses International Components for Unicode (ICU) to implement i18n features in native C/C++ code
Modules: CommonJS modules -- CommonJS modules are the original way to package JavaScript code for Node.js. Node.js also supports the ECMAScript modules standard used by browsers and other JavaScript runtimes.
In Node.js, each file is treated as a separate module.Modules: ECMAScript modules -- ECMAScript modules are the official standard format to package JavaScript code for reuse. Modules are defined using a variety of import and export statements.
Modules: module API -- Provides general utility methods when interacting with instances of Module, the module variable often seen in CommonJS modules. Accessed via import 'module' or require('module').
Modules: Packages -- A package is a folder tree described by a package.json file. The package consists of the folder containing the package.json file and all subfolders until the next folder containing another package.json file, or a folder named node_modules.
This page provides guidance for package authors writing package.json files along with a reference for the package.json fields defined by Node.js.Net -- The net module provides an asynchronous network API for creating stream-based TCP or IPC servers (net.createServer()) and clients (net.createConnection()).
OS -- The os module provides operating system-related utility methods and properties.
Path -- The path module provides utilities for working with file and directory paths.
Performance hooks -- This module provides an implementation of W3C (Web Performance APIs) and also some additional APIs to measure Node.js specific performance measurements
Policies (Experimental) -- Node.js support this experimental feature where it is possible to control access and execution to certain modules through policies.
Process -- the process object is instance of event emitter which provides information of node.js process
Punycode (Deprecated) -- Punycode is a representation of Unicode with the limited ASCII character subset used for Internet hostnames. this module will allow to encode and decode punycode text
Query strings -- This module provide utilities to parse and format URL query strings
Readline -- The readline module provides an interface for reading data from a Readable stream (such as process.stdin) one line at a time.
REPL -- The Read-Eval-Print-Loop implementation available in both standalone and other applications. The repl module exports the repl.REPLServer class. While running, instances of repl.REPLServer will accept individual lines of user input, evaluate those according to a user-defined evaluation function, then output the result. Input and output may be from stdin and stdout, respectively, or may be connected to any Node.js stream.
Report (Diagnostic report) -- The report is intended for development, test and production use, to capture and preserve information for problem determination. It includes JavaScript and native stack traces, heap statistics, platform information, resource usage etc.
Stream -- A stream is an abstract interface for working with streaming data in Node.js. The stream module provides an API for implementing the stream interface. There are many stream objects provided by Node.js. For instance, a request to an HTTP server and process.stdout are both stream instances. Streams can be readable, writable, or both. All streams are instances of EventEmitter.
String decoder -- The 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 characters.
Timers -- The 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.
TLS/SSL -- The 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 events (Experimental) -- The trace_events module provides a mechanism to centralize tracing information generated by V8, Node.js core, and userspace code.
TTY -- The tty module provides the tty.ReadStream and tty.WriteStream classes. In most cases, it will not be necessary or possible to use this module directly or should use require to import module. When Node.js detects that it is being run with a text terminal ("TTY") attached, process.stdin will, by default, be initialized as an instance of tty.ReadStream and both process.stdout and process.stderr will, by default, be instances of tty.WriteStream. The preferred method of determining whether Node.js is being run within a TTY context is to check that the value of the process.stdout.isTTY property is true
UDP/datagram -- The dgram module provides an implementation of UDP datagram sockets. allow you to write websocket layers.
URL -- The url module provides utilities for URL resolution and parsing.
Utilities -- The util module supports the needs of Node.js internal APIs. Many of the utilities are useful for application and module developers as well which are like debuglogs,format strings, callbacks etc.
V8 -- We know that Node.js runs on V8 and V8 is the engine that built on C++ and compails javascirpt to C++ and runs. This module provide little lo level access to V8 module and helps activities like serialize and deserialize data.
VM -- The vm module enables compiling and running code within V8 Virtual Machine contexts. A common use case is to run the code in a different V8 Context. This means invoked code has a different global object than the invoking code.
WASI (Experimental) -- WASI (WebAssembly System Interface) gives sandboxed WebAssembly applications access to the underlying operating system via a collection of POSIX-like functions.
Web Crypto API (Experimental) -- This module provides an implementation of the standard Web Crypto API. The module help to generate keys using different cryptic algorithms, and also helps encode decode text through cryptography.
Web Streams API (Experimental) -- The WHATWG Streams Standard (or "web streams") defines an API for handling streaming data. It is similar to the Node.js Streams API but emerged later and has become the "standard" API for streaming data across many JavaScript environments.
Worker threads -- The worker_threads module enables the use of threads that execute JavaScript in parallel. To access it. Unlike child_process or cluster, worker_threads can share memory. They do so by transferring ArrayBuffer instances or sharing SharedArrayBuffer instances.
Zlib -- The zlib module provides compression functionality implemented using Gzip, Deflate/Inflate, and Brotli.