MCPcopy
hub / github.com/facebook/docusaurus / automaticNamespace

Function automaticNamespace

packages/docusaurus/src/server/storage.ts:14–19  ·  view source on GitHub ↗
(config: PartialConfig)

Source from the content-addressed store, hash-verified

12type PartialConfig = Pick<DocusaurusConfig, 'url' | 'baseUrl' | 'storage'>;
13
14function automaticNamespace(config: PartialConfig): string {
15 const normalizedUrl = addTrailingSlash(
16 normalizeUrl([config.url, config.baseUrl]),
17 );
18 return simpleHash(normalizedUrl, 3);
19}
20
21function getNamespaceString(config: PartialConfig): string | null {
22 if (config.storage.namespace === true) {

Callers 1

getNamespaceStringFunction · 0.85

Calls 3

addTrailingSlashFunction · 0.90
normalizeUrlFunction · 0.90
simpleHashFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…