@azizbecha/strkit
Version:
strkit is a utility library offering a collection of essential string functions including validation, case conversion, truncation, and more. Ideal for both JavaScript and TypeScript developers to simplify string operations in their applications.
13 lines (12 loc) • 369 B
TypeScript
/**
* Checks whether a given string contains an emoji.
*
* @param str - The string to check for emojis.
* @returns A boolean indicating whether the string contains an emoji.
*
* @example
* isEmoji("😊"); // Output: true
* isEmoji("hello"); // Output: false
* isEmoji("👋 hello!"); // Output: true
*/
export default function isEmoji(str: string): boolean;