Docs
Utilities

Utilities

Utility functions for use in Zermatt.

Slugify a string

<div x-data="{}" x-text="Zermatt.Url.slugify('Some human text')"></div>
// some-human-text

PHP sprintf like

<div x-data="{}" x-text="Zermatt.String.sprintf('My name is %s, aged %s', 'John', 45)"></div>
// My name is John, aged 45