ChemPare Documentation - v0.0.0
    Preparing search index...

    Namespace common

    Functions

    isHttpResponse

    Type guard to validate if a value is a valid HTTP Response object. Checks for the presence of essential Response properties and methods.

    isUOM

    Type guard to validate if a value is a valid UOM. Checks if the value is a string and if it is in the UOM array.

    isJsonResponse

    Type guard to validate if a Response object contains JSON content. Checks both the Content-Type header and ensures it's a valid Response object.

    assertJsonResponse

    Type guard to validate if a Response object contains JSON content. Checks both the Content-Type header and ensures it's a valid Response object.

    isHtmlResponse

    Type guard to validate if a Response object contains HTML content. Checks both the Content-Type header and ensures it's a valid Response object.

    assertHtmlResponse

    Type guard to validate if a Response object contains HTML content. Checks both the Content-Type header and ensures it's a valid Response object.

    isValidResult

    Type guard to validate if a value has the minimal required properties of a search result. Checks for the presence and correct types of all required fields for a search result.

    isMinimalProduct

    Type guard to validate if a value has the minimal required properties of a Product. This is a less strict validation than isProduct as it only checks for the minimum required fields. Useful for validating partial product data during construction.

    isProduct

    Type guard to validate if a value is a complete Product object. Checks for the presence and correct types of all required product fields. This is a stricter validation than isMinimalProduct as it ensures all required fields are present.

    isCurrencySymbol

    Type guard to validate if a value is a valid currency symbol. Checks if the value is a string and if it is in the CURRENCY_SYMBOL_MAP.

    isCurrencyCode

    Type guard to validate if a value is a valid currency code. Checks if the value is a string and if it is in the CURRENCY_SYMBOL_MAP.