Inbuilt Libraries
Below are the list of inbuilt libraries that you can require
in your scripts.
- ajv (opens in a new tab) - Ajv JSON schema validator
- axios (opens in a new tab) - Promise based HTTP client for the browser and node.js
- node-fetch (opens in a new tab) - A light-weight module that brings Fetch API to Node.js.
- atob (opens in a new tab) - Turn base64-encoded ascii data back to binary.
- btoa (opens in a new tab) - Turn binary data to base64-encoded ascii.
- chai (opens in a new tab) - BDD/TDD assertion library for node.js and the browser.
- lodash (opens in a new tab) - A modern JavaScript utility library delivering modularity, performance & extras.
- moment (opens in a new tab) - Parse, validate, manipulate, and display dates and times in JavaScript.
- uuid (opens in a new tab) - For the creation of RFC4122 UUIDs
- nanoid (opens in a new tab) - A tiny, secure, URL-friendly, unique string ID generator for JavaScript.
- crypto-js (opens in a new tab) - JavaScript library of crypto standards.
Example:
const { nanoid } = require("nanoid");
req.setHeader("transaction-id", nanoid());