14 lines
471 B
JavaScript
14 lines
471 B
JavaScript
"use strict";
|
|
/** gerar o texto de busca removendo caracteres especies e caixa alta */
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
exports.texto_busca = void 0;
|
|
const texto_busca = (...texto) => texto
|
|
.map((txt) => txt === null || txt === undefined
|
|
? ""
|
|
: String(txt)
|
|
.normalize("NFD")
|
|
.replace(/[\u0300-\u036f]/g, "")
|
|
.replace(/\s+/g, " ")
|
|
.toLowerCase())
|
|
.join(" ");
|
|
exports.texto_busca = texto_busca;
|