bstar.hasnull
v1.1.1
Published
Takes an object, loops through it, and returns `true` if any value in it is `null`.
Downloads
2
Readme
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
}