UNPKG

hytopia

Version:

The HYTOPIA SDK makes it easy for developers to create massively multiplayer games using JavaScript or TypeScript.

57 lines (27 loc) 868 B
<!-- Do not edit this file. It is automatically generated by API Documenter. --> [Home](./index.md) &gt; [client](./client.md) &gt; [HytopiaUI](./client.hytopiaui.md) &gt; [filterProfanity](./client.hytopiaui.filterprofanity.md) ## HytopiaUI.filterProfanity() method Filters inappropriate language from text by replacing profanity with asterisks. Use this to sanitize user-generated content displayed in your UI (e.g., chat messages, usernames). **Signature:** ```typescript filterProfanity(text: string): string; ``` ## Parameters <table><thead><tr><th> Parameter </th><th> Type </th><th> Description </th></tr></thead> <tbody><tr><td> text </td><td> string </td><td> Text to filter </td></tr> </tbody></table> **Returns:** string Filtered text with profanity replaced by asterisks