MCPcopy
hub / github.com/Snailclimb/JavaGuide / slug

Function slug

scripts/docsearch-index.mjs:31–36  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

29 $(selector).first().text().replace(/\s+/g, " ").trim();
30
31const slug = (value) =>
32 value
33 .toLowerCase()
34 .replace(/[^\p{L}\p{N}]+/gu, "-")
35 .replace(/^-+|-+$/g, "")
36 .slice(0, 80);
37
38async function algoliaRequest(path, body, method = "POST") {
39 const response = await fetch(`${algoliaHost}${path}`, {

Callers 1

recordForFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected