Function findFirst

  • Finds the first occurence of an IGemoji item by a filter that is used with the description of each item.

    Example

    import { findFirst } from "@egomobile/emoji"

    // is is case-insensitive
    const firstFaceByString = findFirst("findFirst")
    console.log("firstFaceByString", firstFaceByString)

    // same with RegEx
    const firstFaceByRegex = findFirst(/(face)/i)
    console.log("firstFaceByRegex", firstFaceByRegex)

    Returns

    The matching item or undefined if not found.

    Parameters

    • filter: string | RegExp

      The filter.

    Returns IGemoji | undefined

Generated using TypeDoc