LogoPixi’VN
indexType aliases

Type Alias: ReplaceHandler

> ReplaceHandler = (key) => string | undefined

Defined in: src/handlers/interfaces/ReplaceHandler.ts:11

A handler function invoked for each [key] token found in the text that passes the ReplaceHandlerOptions.validation check.

Parameters

key

string

The content found inside the square brackets (without the brackets themselves). For example, for the token [john] the key is "john".

Returns

string | undefined

The string to substitute in place of [key], or undefined to leave the token unchanged.