Skip to content

Modules

The modules object provides access to preloaded utility libraries inside TBL.

It lets you perform common tasks — data processing, validation, formatting, and more — without importing or installing anything.

Usage

modules.lodash.filter(array, predicate)
modules.jwt.sign(payload, secret)
modules.validator.isEmail("[email protected]")

All modules are sandboxed and safe to use within TBL.

Available Modules

Module Purpose
jwt Create and verify JSON Web Tokens
bcrypt Hash and verify passwords
crypto Cryptographic hashing
ParseCSV Parse CSV strings
ParseYML Parse YAML strings
UUID Generate UUIDs
moment Date formatting and manipulation
lodash Array and object utilities
uaParser Parse user-agent strings
randomstring Generate random strings
validator Validate emails, URLs, and more
chance Random data generation
math Math utilities
qs Query string parsing
cheerio HTML parsing
dayjs Lightweight date formatting
zod Schema validation
shortid Generate short unique IDs
deepmerge Deep-merge objects
humanizeDuration Human-readable durations

Notes

  • modules is available globally in every command
  • No setup or imports are required
  • Only approved libraries are exposed
  • Designed for convenience and security

For TBL-specific helpers (ResourcesLib, tgutil, etc.), see TBL Libraries.