_comuns/dist-import/texto_busca.js
2025-07-07 13:53:19 -03:00

11 lines
No EOL
375 B
JavaScript

/** gerar o texto de busca removendo caracteres especies e caixa alta */
export const texto_busca = (...texto) => texto
.map((txt) => txt === null || txt === undefined
? ""
: String(txt)
.normalize("NFD")
.replace(/[\u0300-\u036f]/g, "")
.replace(/\s+/g, " ")
.toLowerCase())
.join(" ");
//# sourceMappingURL=texto_busca.js.map