MCPcopy Create free account
hub / github.com/BrasilAPI/BrasilAPI / removeSpecialChars

Function removeSpecialChars

util/removeSpecialChars.js:1–5  ·  view source on GitHub ↗
(text)

Source from the content-addressed store, hash-verified

1export default function removeSpecialChars(text) {
2 const newText = text.normalize('NFD').replace(/[\u0300-\u036f]/g, '');
3
4 return newText.toLowerCase().replace(/[^\w ]+/g, '');
5}

Callers 2

getCityByNameFunction · 0.85
normalizeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected