MCPcopy
hub / github.com/AstrBotDevs/AstrBot / normalizeStr

Function normalizeStr

dashboard/src/utils/pluginSearch.js:5–5  ·  view source on GitHub ↗
(s)

Source from the content-addressed store, hash-verified

3const HAN_IDEOGRAPH_RE = /\p{Unified_Ideograph}/u;
4
5export const normalizeStr = (s) => (s ?? "").toString().toLowerCase().trim();
6
7const normalizeLooseFromNormalized = (normalized) =>
8 normalized.replace(/[\s_-]+/g, "").replace(/[()()【】\[\]{}·•]+/g, "");

Callers 5

buildMarketPluginLookupFunction · 0.90
checkUpdateFunction · 0.90
checkAlreadyInstalledFunction · 0.90
normalizeLooseFunction · 0.85

Calls 1

toStringMethod · 0.45

Tested by

no test coverage detected