Message from JavaScript discussions

October 2017

— Https://github.com/gabrielecirulli/2048

— 

$_validateDataObj (data) {
const $_mandatoryKeys: ['List', 'Group', 'email']
return _.every(VueMailUp.$_mandatoryKeys, k => _.hasIn(data, k))
}

— Any way to make this code better?

— Remove $_ from your variables I guess?

— Why introduce the problems of PHP into JS?

— Don't mind that

— $_ is the standard for private vars in VueJS

— I am just asking for the lodash part

— 

function validateDataObj(data) {
const keys = Object.keys(data);
return keys.length === keys.filter(x =>
[ 'List', 'Group', 'email' ].includes(x)).length;
}

?

Message permanent page

— Wait, this might not do the same thing

— Fuck, I can't read lodash like you

— That stuff is cryptic to me