@iocium/domhash - v0.2.0
    Preparing search index...

    Interface DomHashOptions

    Represents the options available for configuring a DOM hashing operation. The DomHashOptions interface allows users to customize the behavior of the hashing process, including the choice of algorithm, attributes to include, and various flags that influence how the DOM is processed.

    DomHashOptions

    interface DomHashOptions {
        algorithm?: "sha256" | "murmur3" | "blake3" | "simhash" | "minhash";
        corsProxy?: string;
        includeAttributes?: string[];
        includeDataAndAriaAttributes?: boolean;
        layoutAware?: boolean;
        puppeteerConnect?: { browserURL?: string; browserWSEndpoint?: string };
        resilience?: boolean;
        shapeVector?: boolean;
        usePuppeteer?: boolean;
    }
    Index

    Properties

    algorithm?: "sha256" | "murmur3" | "blake3" | "simhash" | "minhash"

    An optional string specifying the hashing algorithm to be used. Supported algorithms include: - 'sha256': A widely-used cryptographic hash function. - 'murmur3': A non-cryptographic hash function known for its speed. - 'blake3': A fast cryptographic hash function designed for performance. - 'simhash': An algorithm for similarity hashing used in machine learning. - 'minhash': An algorithm used for estimating the similarity between datasets.

    corsProxy?: string

    An optional string specifying a CORS proxy URL to be used when fetching external resources (e.g., stylesheets, scripts) during the hashing process. This is useful for handling cross-origin requests and ensuring that all necessary resources are accessible.

    includeAttributes?: string[]

    An optional array of strings specifying which attributes should be included in the hash calculation. This allows for fine-tuning of the hashed output based on specific attributes of interest.

    includeDataAndAriaAttributes?: boolean

    An optional boolean flag indicating whether to include data-* and ARIA attributes in the hashing process. If set to true, these attributes will be considered in the hash.

    layoutAware?: boolean

    An optional boolean flag indicating if the hashing operation should consider layout information. If true, the hash will reflect changes in layout, which can be significant for responsive designs.

    puppeteerConnect?: { browserURL?: string; browserWSEndpoint?: string }

    Options for connecting Puppeteer to a remote browser. Either browserWSEndpoint or browserURL can be provided.

    resilience?: boolean

    An optional boolean flag that indicates whether to evaluate and include resilience metrics in the hash result. Setting this to true will incorporate aspects of structural integrity into the hashing process.

    shapeVector?: boolean

    An optional boolean flag that determines whether to generate a shape vector for the DOM structure. When true, the shape of the DOM will be represented as a vector, which may help in analyzing the layout or arrangement of elements.

    usePuppeteer?: boolean

    Use an existing Chrome instance via Puppeteer.