a-synchronous / a-synchronous/rubico
reduce.right
Đang mở
enhancement
help wanted
- Ngôn ngữ chính
- JavaScript
- Star
- 283
- Fork
- 17
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
reduces from the right
works on `Array` and `String`
should work for sync and async provided functions.
should return a sync value if provided function is sync
```javascript
reduce.right((a, b) => a.concat(b), [])([1, 2, 3, 4, 5]) // > [5, 4, 3, 2, 1]
reduce.right((a, b) => a + b)('12345') // > '54321'
reduce.right((a, b) => Promise.resolve(a + b))('12345') // > Promise { '54321' }
```
Hướng dẫn đóng góp
Đánh giá
Issue này chưa được đánh giá.