Skip to content

Instantly share code, notes, and snippets.

View ma-henderson's full-sized avatar

Mathias Henderson ma-henderson

View GitHub Profile
@ma-henderson
ma-henderson / filterDoctors.js
Last active February 28, 2021 09:07
Take received filters params and return doctors who fit within the criteria (UNION/OR not AND)
filterDoctors = (doctors, filters) => {
let filteredDoctors = [];
if (filters.gender.length > 0) {
filteredDoctors.concat(
filters.gender.map((gender) =>
filteredDoctors.filter((doctor) => doctor.gender == gender)
)
);
}
if (filters.specs.length > 0) {
@ma-henderson
ma-henderson / card-and-video-practice-1.markdown
Created August 18, 2020 11:20
Card and Video practice 1
{
"atletas": [
{
"nome": "Leonardo Cittadini",
"slug": "leo-cittadini",
"apelido": "Léo Cittadini",
"foto": "https://s.glbimg.com/es/sde/f/2019/03/30/475167cdad7e826c64f4a0a999f8aef9_FORMATO.png",
"atleta_id": 70986,
"rodada_id": 1,
"clube_id": 293,