@empathyco/x-components
Version:
Empathy X Components
61 lines (29 loc) • 779 B
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@empathyco/x-components](./x-components.md) > [capitalize](./x-components.capitalize.md)
## capitalize() function
Util to capitalize a string .
**Signature:**
```typescript
export declare function capitalize<StrType extends string>(str: StrType): Capitalize<StrType>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
str
</td><td>
StrType
</td><td>
String value.
</td></tr>
</tbody></table>
**Returns:**
Capitalize<StrType>
Returns the string capitalized.
## Example
Transforms `query` into `Query`