a-synchronous / a-synchronous/rubico

map.rate

未關閉
#277 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
enhancement
主要語言
JavaScript
星號
283
分支
17
PR 合併指標
30 天內沒有已合併 PR

描述

```js
map.rate(
[1, 2, 3, 4, 5],
5, // executions per second
async n => n ** 2
).then(console.log) // [1, 4, 9, 16, 25]
```

accepts an integer `rate` with units `/s`

貢獻指南

開啟貢獻指南

研究方向

在程式碼庫中尋找 map.rate 函式,它可能位於類似 map.js 或 rate.js 的檔案中。了解目前 map 和速率限制是如何實作的。此功能需要接受一個單位為每秒的整數 rate 參數,並將其套用於陣列的 mapping。檢查 map 或 rate 的現有測試以了解測試模式,並為新函式撰寫測試,驗證其運作方式如範例所示。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
javascript
領域
backend-api-design
Issue 類型
功能
難度
3/5
預估耗時
1-2 天
活躍度
停滯
描述清晰度
描述清楚
新手友好度
55/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。