Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: adding 100 verses and excluding duplicated #24

Merged

Conversation

clovisdanielss
Copy link
Contributor

No description provided.

Copy link

vercel bot commented Apr 10, 2024

@clovisdanielss is attempting to deploy a commit to the Salinas' projects Team on Vercel.

A member of the Team first needs to authorize it.

@clovisdanielss
Copy link
Contributor Author

A ordem dos versos ficou diferente, por isso que ficou aparentemente como se os primeiros versos tivessem sido mudados, mas uma pesquisa rápida prova que ainda estão lá. Com os 100 que coloquei tinha ficado 291. Tem 254 que são únicos.

Só um exemplo:

Aqui dá a impressão que eu deletei um verso e coloquei outro, mas é só buscar pelos salmos 23:1 que você vai achar lá em baixo
image

image

@clovisdanielss
Copy link
Contributor Author

Caso você fique preocupado se eu não apaguei nenhum verso, eu só fiz isso abaixo.

obj eu iniciei como sendo o array de versos com os meus 100 adicionados (291)

repeated = obj.filter(item => obj.filter(aux => aux["abbrev"] == item["abbrev"] && aux["chapter"] == item["chapter"] && aux["verse"] == item["verse"]).length > 1)

single = obj.filter(item => obj.filter(aux => aux["abbrev"] == item["abbrev"] && aux["chapter"] == item["chapter"] && aux["verse"] == item["verse"]).length == 1)

for(let i = 0; i < repeated.length; i++){
    let item = repeated[i];
    if(!single.find(aux => aux["abbrev"] == item["abbrev"] && aux["chapter"] == item["chapter"] && aux["verse"] == item["verse"])) 
        {
            single.push(item)
        }
}

@eoSalinas
Copy link
Owner

Showw @clovisdanielss! Fica tranquilo, entendi sim o que você fez e obrigado.

Valeuuu pela PR! +100 versículos 🤝

@eoSalinas eoSalinas merged commit 36287e1 into eoSalinas:feat/add-365-verses Apr 10, 2024
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants