Skip to content

Others

A collection of utility functions designed to simplify common tasks in your application.

String To xtyle.stringTo

The xtyle.stringTo.<method> utility provides various methods for converting and manipulating strings into different formats.

Method Description
camel Converts a string to camel case.
slug Converts a string to a slug.
lower Converts a string to lowercase.
upper Converts a string to uppercase.
title Converts a string to title case.
pascal Converts a string to pascal case.
docs Converts a string to documentation format.
snake Converts a string to snake case.
slot Converts a string from kebab to pascal case.
cut Trims a string to a specified length.

General Utilities xtyle.util

The xtyle.util.<method> utility provides a variety of methods for different common tasks in your application.

Method Description
inject Injects replaceable CSS into the document.
form Converts an object into a form data structure.
timer Converts years, months, days, hours, minutes, and seconds into milliseconds
props Transforms an object's keys to camelCase.