ChemPal Documentation - v1.17.0
    Preparing search index...
    • Type guard for cached Searchanise credentials. Requires a 10-character alphanumeric apiKey and a non-empty host string. It checks shape only; the supplier separately checks the host against its allow-list before using it.

      Parameters

      • data: unknown

        The value to validate (typically read back from extension storage)

      Returns data is SearchaniseCredentials

      Type predicate indicating whether the value is usable credentials

      isSearchaniseCredentials({ apiKey: '4p4M0R6q0N', host: 'searchserverapi1.com' }); // true
      isSearchaniseCredentials({ apiKey: 'short', host: 'searchserverapi1.com' }); // false
      export function isSearchaniseCredentials(data: unknown): data is SearchaniseCredentials {
      return v.safeParse(searchaniseCredentialsSchema, data).success;
      }