ChemPal Documentation - v1.12.0
    Preparing search index...
    • Supplier class names mapped to whether they ship to location, so the UI can grey out suppliers that can't reach the user. Applies the same shipsTo/scope heuristic as search time — both go through shipsToCountry.

      Parameters

      • location: valueof

        The user's location as an ISO 3166-1 alpha-2 country code.

      Returns Record<string, boolean>

      Record mapping supplier class names to a ships-to boolean.

      supplierShipsTo('US').SupplierWarchem; // => false
      
      export function supplierShipsTo(location: CountryCode): Record<string, boolean> {
      return Object.fromEntries(
      Object.entries(SUPPLIER_META).map(([key, meta]) => [key, shipsToCountry(meta, location)]),
      );
      }