• Parameters

    • id: ItemID

      ID you want to convert, it can be string or a valid ObjectId

    • Optionalencoding: "base64" | "hex"

      Optional converting method can be "base64" or "hex" defaults to "hex"

    Returns string

    Fulfilled - String version of the id.

    This function converts an id to string if it's an ObjectId, if not it'll return the given input.