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

Function simpleHash

packages/docusaurus-utils/src/hashUtils.ts:18–20  ·  view source on GitHub ↗
(str: string, length: number)

Source from the content-addressed store, hash-verified

16
17/** Creates an MD5 hash and truncates it to the given length. */
18export function simpleHash(str: string, length: number): string {
19 return md5Hash(str).substring(0, length);
20}
21
22// Based on https://github.com/gatsbyjs/gatsby/pull/21518/files
23/**

Callers 7

pluginFunction · 0.90
hashUtils.test.tsFile · 0.90
automaticNamespaceFunction · 0.90
genChunkNameFunction · 0.90
generateUniqueRouteKeyFunction · 0.90
docuHashFunction · 0.85

Calls 1

md5HashFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…