s
s
spellbook
Search…
isEmpty
Check isEmpty values (null, "", [], undefined) Alternative names: empty
1
const a = ""
2
sb.isEmpty(a)
Copied!
1
-> true
Copied!
sb.isEmpty && sb.get combination:
1
const a = {
2
a: [
3
{ a: [1, 2, 3] }
4
],
5
b: 4
6
}
7
8
sb.isEmpty(sb.get(a, 'a.0.a.1'))
Copied!
1
-> false
Copied!
1
sb.isEmpty(sb.get(a, 'a.0.b.1'))
Copied!
1
-> true
Copied!
1
sb.isEmpty(sb.get(a, 'a.0.b.1'))
Copied!
1
-> true
Copied!
Last modified 1yr ago
Copy link