isEmtpy

Check isEmpty values (null, "", [], undefined)

var a = ""
if (sb.isEmpty(a)) return true
-> true

sb.isEmpty && sb.get combination:

var a = { a : [{ a : [1, 2, 3]}], b : 4 }
if (sb.isEmpty(sb.get('a', 'a.0.a.1'))) return true
-> false
var a = { a : [{ a : [1, 2, 3]}], b : 4 }
if (sb.isEmpty(sb.get('a', 'a.0.b.1'))) return true
-> true

Can negate a sb.isEmpty in same example:

var a = { a : [{ a : [1, 2, 3]}], b : 4 }
return !sb.isEmpty(sb.get('a', 'a.0.b.1'))
-> false

results matching ""

    No results matching ""