converter objeto em javascript booleano
// bool will be false if object is null, false, 0, etc.
// bool will be true if object is an array, object, non-zero number, etc.
// method 1
let bool = !!object;
// method 2
let bool = Boolean(object);
DenverCoder1