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

      ChemPal Documentation - v1.7.0

      Categories & Groups / Category

      Utils

      155 entries across 30 modules.

      utils/BadgeAnimator1

      • BadgeAnimator

        A utility class for managing Chrome extension badge animations and styling. Provides methods to animate the badge with different character sets, set colors, and control the animation timing. The badge can be used to show loading states, progress indicators, or other status information in the Chrome extension icon.

      utils/badgeController8

      utils/Cactus1

      • Cactus

        A client for the Cactus Chemical Identifier Resolver API.

        This class provides methods to retrieve various chemical information including names, structures, properties, and identifiers from the NCI Cactus service.

        API Documentation: https://cactus.nci.nih.gov/chemical/structure_documentation

        This service works as a resolver for different chemical structure identifiers and allows one to convert a given structure identifier into another representation or structure identifier. You can either use the web form of the resolver or the following simple URL API scheme:

        http:///chemical/structure/"structure identifier"/"representation"
        

        The service returns the requested new structure representation with a corresponding MIME-Type specification (in most cases MIME-Type: "text/plain"). If a requested URL is not resolvable for the service an HTML 404 status message is returned. In the (unlikely) case of an error, an HTML 500 status message is generated.

      utils/debugConsole1

      displayContext4

      utils/fetchDecorator2

      utils/fuzzScorerLab19

      utils/HttpLru1

      • HttpLru

        A singleton LRU (Least Recently Used) cache for HTTP responses, backed by cstorage.local for persistence across browser sessions.

        The cache uses a doubly-linked list combined with a Map for O(1) lookups, insertions, and evictions. When the cache exceeds its configured capacity, the least recently accessed entry is automatically evicted.

        State is persisted to cstorage.local on every mutation so that cached responses survive extension restarts and browser closures.

      utils/idbCache46

      utils12

      utils/isDevBuild1

      • IS_DEV_BUILD

        Build-mode flag derived from Vite's import.meta.env.MODE.

        true for any non-production Vite build: the dev server (pnpm dev), --mode=development, --mode=aggregate, --mode=mock, and Vitest (which uses MODE === "test"). false only for --mode=production (i.e. pnpm build:prod).

        Vite replaces import.meta.env.MODE with a string literal at build time, so downstream if (!IS_DEV_BUILD) branches collapse to dead code in prod and are removed by Rollup's tree-shaking.

      utils/Logger2

      • LogLevel

        Available logging levels in ascending order of severity: DEBUG → INFO → WARN → ERROR

      • Logger

        A flexible logging utility that supports different log levels and prefixed output.

      utils/ProductBuilder1

      • ProductBuilder

        Builder class for constructing Product objects with a fluent interface. Implements the Builder pattern to handle complex product construction with optional fields and data validation.

      utils/Pubchem1

      • Pubchem

        A utility class for interacting with the PubChem API to retrieve chemical compound information.

        This class provides methods to search for compounds, retrieve their CID (Compound ID), and query detailed molecular properties using PubChem's SDQ (Structure Data Query) agent.

      reviewStats7

      utils/search-query/detectTermType2

      • SearchTermType

        The kind of thing a single search term looks like. Used purely to colorize the search box — it does not change search behavior.

      • detectTermType

      utils/search-query/evaluateAst3

      utils/search-query/extractPositiveTerms2

      utils/search-query/highlightSearchQuery6

      utils/search-query/parseSearchQuery3

      utils/search-query/translators/translateAstToContainsFilter3

      utils/search-query/translators/translateAstToFreefind1

      utils/search-query/translators/translateAstToShopifyQuery1

      utils/search-query/translators/translateAstToTypesenseFilter1

      utils/search-query/translators/translateAstToWixFilter1

      utils/search-query/types6

      • TermNode

        A single search phrase leaf (e.g. Potassium Permanganate).

      • AndNode

        Boolean AND of two sub-expressions.

      • OrNode

        Boolean OR of two sub-expressions.

      • NotNode

        Boolean negation of a sub-expression.

      • SearchAst

        A node in the normalized search-query tree.

      • ParsedSearchQuery

        The result of parsing a raw search string.

      utils/storage10

      utils/SupplierCache1

      • SupplierCache

        Utility class for managing supplier data caching in IndexedDB. Provides a robust caching system for both query results and product detail data.

      utils/SupplierStatsStore7

      themeIcon1