empty

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

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

sb.empty && sb.get combination:

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

Can negate a sb.empty in same example:

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

results matching ""

    No results matching ""