4.8.0 • Published 4 years ago
@unction/compact v4.8.0
@unction/compact
ListType<A | null> | RecordType<unknown, A | null> => Array | Set | Record<string | number | symbol, B> | Map<B, A> | string
Takes a collection (Array or Object) and returns a copy of that value without null
or undefined
values.
avatarUrls // => [null, "/1.jpg", null, "/3.jpg"]
compact(avatarUrls) // => ["/1.jpg", "/3.jpg"]
user // {"avatar": null, "name": "Kurtis Rainbolt-Greene"}
compact(head(user)) // {"name": "Kurtis Rainbolt-Greene"}
4.8.0
4 years ago
4.7.0
4 years ago
4.6.0
4 years ago
4.5.1
5 years ago
4.5.0
5 years ago
4.4.1
5 years ago
4.4.0
5 years ago
4.3.0
5 years ago
4.2.1
5 years ago
4.2.0
5 years ago
4.1.1
5 years ago
4.1.0
5 years ago
4.0.2
5 years ago
4.0.1
5 years ago
4.0.0
5 years ago
3.0.0
7 years ago
2.8.0
7 years ago
2.7.0
7 years ago
2.6.0
7 years ago
2.5.0
7 years ago
2.4.0
7 years ago
2.3.0
7 years ago
2.1.0
7 years ago
2.0.0
7 years ago
1.0.5
7 years ago
1.0.4
7 years ago
1.0.3
7 years ago
1.0.2
7 years ago
1.0.1
7 years ago
1.0.0
8 years ago