Skip to content

Variable: Str ​

const Str: object

Defined in: src/str.ts:347

Static methods for string manipulation

Type Declaration ​

of ​

of: (value) => Stringable

Create a new fluent stringable instance

Parameters ​

value ​

unknown

The initial string value

Returns ​

Stringable

A new Stringable instance

slug ​

slug: (value) => string

Convert a string to a slug

Parameters ​

value ​

string

The string to slugify

Returns ​

string

The slugified string

snake ​

snake: (value) => string

Convert a string to snake_case

Parameters ​

value ​

string

The string to convert

Returns ​

string

The snake_case string

kebab ​

kebab: (value) => string

Convert a string to kebab-case

Parameters ​

value ​

string

The string to convert

Returns ​

string

The kebab-case string

camel ​

camel: (value) => string

Convert a string to camelCase

Parameters ​

value ​

string

The string to convert

Returns ​

string

The camelCase string

studly ​

studly: (value) => string

Convert a string to StudlyCase

Parameters ​

value ​

string

The string to convert

Returns ​

string

The StudlyCase string

title ​

title: (value) => string

Convert a string to title case

Parameters ​

value ​

string

The string to convert

Returns ​

string

The title case string

limit ​

limit: (value, size, end?) => string

Limit the length of a string

Parameters ​

value ​

string

The string to limit

size ​

number

The maximum length

end? ​

string = '…'

The string to append if limited

Returns ​

string

The limited string

random ​

random: (length?) => string

Generate a random alphanumeric string

Parameters ​

length? ​

number = 16

The length of the random string

Returns ​

string

The random string

uuid ​

uuid: () => string

Generate a UUID (version 4)

Returns ​

string

The generated UUID

Documentation of 1.0.13 , built from cf61d3b on 1.0.13 by pipeline #2985011498 on 2026-10-21.