JSFiddle - React, Tailwind, and code Playground

by swoogie

JavaScript

_.mixin({
    isSet: function (e) {
        return (_.isArray(e) && (_.filter(e, function (x) {
            return (x[0] !== "")
        }).length > 0)) || (_.isString(e) && e.length > 0);
    }
});


var u="taken"
    v=""
    w = [["", ""],["345", "54444"],["", ""]],
    x = [["", ""],["", ""],["", ""]],
    y = [[""],[""],["asdf"]],
    z = [[""],[""],[""]]
    
console.log(_.isSet(u));
console.log(_.isSet(v));
console.log(_.isSet(w));
console.log(_.isSet(x));
console.log(_.isSet(y));
console.log(_.isSet(z));