Skip to main content

Introduction

Instead of reinventing the wheel, Compozy provides direct access to well-established JavaScript utility libraries within your template expressions:
  • Lodash - For general utility functions (_)
  • Voca - For string manipulation (v)
  • Day.js - For date operations (dayjs)
  • Numeral.js - For number formatting (numeral)
These libraries are available globally in your template expressions, providing battle-tested and well-documented functionality. Need additional libraries? You can add custom dependencies through the $ namespace (e.g., $.math, $.decimal). Check out Custom Dependencies to learn more.

Built-in Libraries

Lodash Functions

Available through the _ global variable.

Voca Functions

Available through the v global variable.

Day.js Functions

Available through the dayjs global variable.

Numeral.js Functions

Available through the numeral global variable.

Best Practices

Library Documentation

Each library provides extensive documentation for their functions:

Function Categories

For convenience, we’ve organized common operations into categories:

Next Steps

Template engine

Learn about template expressions

Custom Dependencies

Add custom libraries