Function getId

  • Extracts the numeric ID from a blog entry identifier string or object.

    Parameters

    • source: string | RawText | Record<"id", string | RawText>

      The source containing the ID.

    • type: "blog" | "post" | "page"

      The type of entry ID to extract (blog, post, page).

    Returns string

    The extracted numeric ID as a string

    If type is invalid or ID cannot be extracted

    1.2