Security News
Input Validation Vulnerabilities Dominate MITRE's 2024 CWE Top 25 List
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Pacote para facilitar buscas fonéticas usando o algoritmo buscaBR para JavaScript
A instalação é simples. Se usando node.js instale com NPM.
npm install busca-br
Se você for usar no browser salve este arquivo: AQUI na pasta de sua aplicação.
Ou inclua:
<script src="https://raw.githubusercontent.com/JayrAlencar/buscaBR.js/master/browser/buscaBR.js"></script>
Em node.js:
var buscaBR = require('../buscaBR');
buscaBR.search('feijaum',['arroz','feijão','feijoada'],function(res){
console.log(res);
});
A resposta é um array de objetos JSON informando o termo encontrado e o index que ele está no array passado
<script src="https://raw.githubusercontent.com/JayrAlencar/buscaBR.js/master/browser/buscaBR.js"></script>
<script>
var buscabr = new buscaBR();
buscaBR.search('feijaum',['arroz','feijão','feijoada'],function(res){
alert(res[0].termo);
});
</script>
Esta função faz a pesquisa de forma sincrona e retorna um array de objetos JSON com os resultados encontrados. Veja:
var buscabr = new buscaBR();
var resultado = buscabr.searchSync('feijaum',['arroz','feijão','feijoada']);
console.log(resultado);
Se você deseja somente codificar o texto, para salvar no banco de dados por exemplo, use o método encode();
var buscabr = new buscaBR();
console.log(console.log(buscaBR.encode('paralelepipedo')));
//Vai retornar
Paralalepipedo | PRPD |
Jayr Alencar | J RMK |
Alexandre | RSMR |
Clube dos Geeks | CRB D JK |
FAQs
Modulo para usar o algoritmo buscaBR em javascript/node.js
The npm package busca-br receives a total of 26 weekly downloads. As such, busca-br popularity was classified as not popular.
We found that busca-br demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.