chore: small changes

This commit is contained in:
redhoodsu
2020-03-20 17:16:40 +08:00
parent 40e7f0ae38
commit 611f3061ed
2 changed files with 0 additions and 53 deletions

View File

@@ -871,22 +871,6 @@ castPath('a[0].b'); // -> ['a', '0', 'b']
castPath('a.b.c', {'a.b.c': true}); // -> ['a.b.c']
```
## chunk
Split array into groups the length of given size.
|Name |Desc |
|------|--------------------|
|arr |Array to process |
|size=1|Length of each chunk|
|return|Chunks of given size|
```javascript
chunk([1, 2, 3, 4], 2); // -> [[1, 2], [3, 4]]
chunk([1, 2, 3, 4], 3); // -> [[1, 2, 3], [4]]
chunk([1, 2, 3, 4]); // -> [[1], [2], [3], [4]]
```
## clamp
Clamp number within the inclusive lower and upper bounds.