Home / Function/ getAlgorithm() — astro Function Reference

getAlgorithm() — astro Function Reference

Architecture documentation for the getAlgorithm() function in common.ts from the astro codebase.

Entity Profile

Dependency Diagram

graph TD
  b60ffa04_9ff0_e4ee_a22d_701c3b7ada95["getAlgorithm()"]
  0f62fcfb_9504_86a2_16bb_d8a9742e1f23["common.ts"]
  b60ffa04_9ff0_e4ee_a22d_701c3b7ada95 -->|defined in| 0f62fcfb_9504_86a2_16bb_d8a9742e1f23
  style b60ffa04_9ff0_e4ee_a22d_701c3b7ada95 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/astro/src/core/csp/common.ts lines 18–23

export function getAlgorithm(csp: EnabledCsp): CspAlgorithm {
	if (csp === true) {
		return 'SHA-256';
	}
	return csp.algorithm;
}

Domain

Subdomains

Frequently Asked Questions

What does getAlgorithm() do?
getAlgorithm() is a function in the astro codebase, defined in packages/astro/src/core/csp/common.ts.
Where is getAlgorithm() defined?
getAlgorithm() is defined in packages/astro/src/core/csp/common.ts at line 18.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free