Skip to content
On this page

Inbuilt Libraries

Below are the list of inbuilt libraries that you can use you in your scripts. You can be access them using the bru.require() method

  • ajv - Ajv JSON schema validator
  • atob - Turn base64-encoded ascii data back to binary.
  • btoa - Turn binary data to base64-encoded ascii.
  • lodash - A modern JavaScript utility library delivering modularity, performance & extras.
  • uuid - For the creation of RFC4122 UUIDs
  • nanoid - A tiny, secure, URL-friendly, unique string ID generator for JavaScript.
  • crypto-js - JavaScript library of crypto standards. for JavaScript.

Example:

javascript
const { nanoid } = require("nanoid");

req.setHeader("transaction-id", nanoid());