ChemPal Documentation - v1.18.0
    Preparing search index...

      ChemPal Documentation - v1.18.0

      Categories & Groups / Category

      Helpers

      201 entries across 38 modules.

      components/SearchPanel/PriceTrendGraph1

      constants/common1

      • CAS_REGEX

        Regular expression for validating CAS (Chemical Abstracts Service) numbers. Matches the standard format of three segments: 2-7 digits, 2 digits, and 1 checksum digit.

      helpers/advancedMode1

      helpers/analytics4

      • CAPTURE_PATH

        PostHog single-event capture path, appended to the configured host.

      • PARAM_VALUE_LIMIT

        Self-imposed cap on the length of a text property value, from config.json (analytics.paramValueLimit). Not a PostHog limit (its ceiling is ~1MB) — a privacy guard bounding how much of a search term or error message can leave the device.

      • COMPONENT_STACK_LIMIT

        Self-imposed cap on how much of a React component stack rides along in a $exception event, from config.json (analytics.componentStackLimit). Unlike JS stack frames (capped by count via STACKTRACE_FRAME_LIMIT), a component stack is one unstructured string, so it's bounded by length.

      • AnalyticsValue

        A JSON-safe value a PostHog event property may hold — the primitives trackEvent always accepted, plus arrays/objects for structured properties like $exception_list.

      helpers/backgroundFetch3

      helpers/bugReport1

      • Diagnostics

        A fully-assembled diagnostics snapshot, ready to render into a report.

      helpers/currency7

      helpers/dom2

      helpers/errorBuffer2

      • ErrorSource

        Where a captured error originated: a global window/worker hook, an unhandled promise rejection, React's error hooks, an aggregated supplier-search failure, or a callback-style chrome.* API call that set chrome.runtime.lastError.

      • CapturedError

        A single captured exception, trimmed to what a bug report needs.

      helpers/excludedProducts7

      helpers/fetch4

      helpers/history2

      helpers/i18n5

      helpers/patchCachedProduct2

      helpers/permissions3

      helpers/price5

      helpers/priceAlerts16

      helpers/priceHistory10

      helpers/product8

      helpers/productIdentity3

      helpers/productLabels2

      helpers/productRef6

      • helpers/productRef

        References to specific supplier products, used to refetch them without running a search.

      • VariantRef

        The identifiers of one size of a product. Suppliers with grouped listings refetch each member.

      • ProductRef

        Everything needed to refetch one specific product. It carries several identifiers because no single field works for every supplier.

      • ProductLookup

        The builders a supplier found for a batch of refs.

      • ProductRefreshResult

        The outcome of refetching one product. Only OK carries a product.

      • toProductRef

      helpers/purchaseRestriction2

      helpers/quantity9

      helpers/remoteLogs1

      helpers/request7

      helpers/requestCache4

      helpers/responseAggregate6

      helpers/runtime1

      helpers/schema-org6

      scrubPii3

      • scrubPii

        Strips personally identifiable and credential-like data from text and values before they are sent off the device as diagnostic logs. Pattern-based and deliberately conservative: it removes what it recognizes, so it complements (not replaces) not logging sensitive data in the first place.

      • scrubText
      • scrubValue

      helpers/searchFilters1

      helpers/smiles7

      helpers/supplierFilters5

      helpers/supplierStats8

      updates13

      helpers/utils30

      helpers/wikidata3

      • getLocalizedNames

        Resolves a CAS number or English chemical name to its Wikidata label and aliases in another language. Cached for wikidata.ttlDays (config.json); a definitive "no match" is cached as an empty array, a failed request (undefined) is not.

      • EnglishChemical

        A chemical resolved to its English name and CAS number. Both are absent for "no match".

      • resolveEnglishChemical

        Resolves a chemical name written in English or a configured source language (see wikidata.sourceLanguages in config.json, e.g. Dutch zoutzuur) to its English name and CAS number. The term must equal a Wikidata label or alias exactly, so an unrelated top search hit is never trusted. Cached for wikidata.ttlDays; a definitive "no match" is cached as {}, a failed request (undefined) is not.