1.1.1 • Published 5 years ago
bstar.hasnull v1.1.1
HasNull
Takes an object, loops through it, and returns true
if any value in it is null
. Useful for checking collections of required elements & attributes.
Example Usage
import HasNull from 'bstar.hasnull';
const ui = {
closeButtons: document.querySelector('.button--close'),
openButtons: someElement.getAttribute('data-endpoint') || null
};
if (!HasNull(ui)) {
// ui has no null values
}