MCPcopy
hub / github.com/simple-icons/simple-icons / titleToSlug

Function titleToSlug

sdk.mjs:61–69  ·  view source on GitHub ↗
(title)

Source from the content-addressed store, hash-verified

59 * @returns {string} The slug/filename for the title.
60 */
61export const titleToSlug = (title) =>
62 title
63 .toLowerCase()
64 .replaceAll(
65 TITLE_TO_SLUG_CHARS_REGEX,
66 (char) => TITLE_TO_SLUG_REPLACEMENTS[char],
67 )
68 .normalize('NFD')
69 .replaceAll(TITLE_TO_SLUG_RANGE_REGEX, '');
70
71/**
72 * Converts a slug into a variable name that can be exported.

Callers 5

get-filename.jsFile · 0.90
isNewIconFunction · 0.90
sortDuplicatesCompareFunction · 0.90
checkSlugsFunction · 0.90
getIconSlugFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…