diff --git a/packages/ccc/src/utils/chat.ts b/packages/ccc/src/utils/chat.ts index 2466491..18829a3 100644 --- a/packages/ccc/src/utils/chat.ts +++ b/packages/ccc/src/utils/chat.ts @@ -8,8 +8,28 @@ const prefixAndSuffix = (prefixAndSuffix: string) => : str }${prefixAndSuffix}` +/** + * Generate action string. + * + * @example + * ```ts + * const foo = action`Hello, World` // `*Hello, World*` + * const bar = action('What is love?') // '*What is love?*' + * const baz = action(['lorem,', 'ipsum']) // '*lorem, ipsum*' + * ``` + */ export const action = prefixAndSuffix('*') + +/** + * Generate message string. + * + * @example + * ```ts + * const foo = message`Hello, World` // `"Hello, World"` + * const bar = message('What is love?') // '"What is love?"' + * const baz = message(['lorem,', 'ipsum']) // '"lorem, ipsum"' + * ``` + */ export const message = prefixAndSuffix('"') -export { action as act } -export { message as msg } +export { action as act, message as msg }