Skip to content

Commit b8dc909

Browse files
committed
docs: document size function
1 parent 07cc884 commit b8dc909

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

docs/functions.md

+15-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ filter $ => .age >= 18
8383

8484
## length
8585

86-
Returns the length of the input:
86+
Returns the length of the input if it's an array:
8787

8888
```
8989
[1, 0, 1] | length
@@ -93,6 +93,20 @@ Returns the length of the input:
9393
3
9494
```
9595

96+
Returns the count of the elements of an object if the input is an object:
97+
98+
```
99+
{"foo": "bar"} | length
100+
```
101+
102+
```
103+
1
104+
```
105+
106+
## size
107+
108+
Same as `length`.
109+
96110
## reverse
97111

98112
Reverses the input:

0 commit comments

Comments
 (0)