Skip to content

relizy / sliceSlackText

Function: sliceSlackText() ​

sliceSlackText(text, length): string

Defined in: src/core/slack-markdown.ts:130

Cut a text without splitting a UTF-16 surrogate pair (emoji), which Slack would render broken.

Parameters ​

text ​

string

length ​

number

Returns ​

string

Released under the MIT License.