UNPKG
assertthat
Version:
internal (6.0.0-internal.7)
latest (6.5.2)
6.5.2
6.5.1
6.5.0
6.4.0
6.3.14
6.3.13
6.3.12
6.3.11
6.3.10
6.3.9
6.3.8
6.3.7
6.3.6
6.3.5
6.3.4
6.3.3
6.3.2
6.3.1
6.3.0
6.2.2
6.2.1
6.2.0
6.1.1
6.1.0
6.0.1
6.0.0
6.0.0-internal.7
6.0.0-internal.6
6.0.0-internal.5
6.0.0-internal.4
6.0.0-internal.3
6.0.0-internal.2
6.0.0-internal.1
5.2.8
5.2.7
5.2.6
5.2.5
5.2.4
5.2.3
5.2.2
5.2.1
5.2.0
5.1.1
5.1.0
5.0.2
5.0.1
4.0.2
4.0.1
4.0.0
3.3.0
3.2.0
3.1.0
3.0.0
2.0.3
2.0.2
2.0.1
2.0.0
1.0.0
0.11.0
0.10.3
0.10.2
0.10.1
0.10.0
0.9.0
0.8.5
0.8.4
0.8.3
0.8.2
0.8.1
0.8.0
0.7.2
0.7.1
0.7.0
0.6.0
0.5.3
0.5.2
0.5.1
0.5.0
0.4.2
0.4.1
0.4.0
0.3.0
0.2.3
assertthat provides fluent TDD.
github.com/thenativeweb/assertthat
thenativeweb/assertthat
assertthat
/
lib
/
size
/
forObjects
/
objectSize.ts
13 lines
(10 loc)
•
259 B
text/typescript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
import
{ size }
from
'../typeAware/size'
;
import
{ sum }
from
'../../utils/sum'
;
const
objectSize =
function
(
value
:
object
):
number
{
return
1
+
sum
([ ...
Object
.
values
(value) ].
map
( (
item
:
any
):
number
=>
size
(item) )); };
export
{ objectSize };