MCPcopy Create free account
hub / github.com/Linen-dev/linen.dev / normalize

Function normalize

packages/utilities/src/string.ts:33–36  ·  view source on GitHub ↗
(str?: string | null)

Source from the content-addressed store, hash-verified

31}
32
33export function normalize(str?: string | null) {
34 if (!str) return '';
35 return str.replace(/[^\p{L}\p{N}\p{Z}$+<=>^`|~]/gu, ' ').replace(/\s+/g, ' ');
36}
37
38export function pad(string: string, length: number) {
39 if (string.length < length) {

Callers 5

buildThreadSeoFunction · 0.90
buildNameTextFunction · 0.90
joinCommunityFunction · 0.90
joinCommunityMethod · 0.90
auth.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected