bkp
This commit is contained in:
parent
f30428ce4d
commit
1968877db8
63 changed files with 6 additions and 12 deletions
11
dist-import/texto_busca.js
Normal file
11
dist-import/texto_busca.js
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
/** 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")
|
||||
// biome-ignore lint/suspicious/noMisleadingCharacterClass: <explanation>
|
||||
.replace(/[\u0300-\u036f]/g, "")
|
||||
.replace(/\s+/g, " ")
|
||||
.toLowerCase())
|
||||
.join(" ");
|
||||
Loading…
Add table
Add a link
Reference in a new issue