Skip to main content

Prray

github.com

Prray 是一个支持异步操作的数组封装库,与原生数组兼容但提供更友好的异步处理方法,如 mapAsync、filterAsync 等,支持链式调用和并发控制。

Developer Tools & APIsOpen source#async#javascript#library
Visit website
Prray preview

很多时候,如果数组对异步函数更友好,代码写起来会更自然一些Prray -- "Promisified" Array和数组保持兼容,但对异步操作更加友好。在某些场合可以替代原生数组,让你能这么写代码:javascriptconst urls = prray(array)const jsons = await urls.mapAsync(fetch).mapAsync(r => r.json())console.log(jsons)const files = prray(array2)await files.filterAsync(isExisted).sort(bySize).mapAsync(removeFile, { concurrency: 20 })- 和数组保持兼容- 异步也能链状调用- 支持并发限速实现上没有任何原型链污染和全局污染,测试良好(尤其在兼容性方面),也没有其他三方依赖https://github.com/Bin-Huang/prray

More in Developer Tools & APIs

SolveHub

API for CAPTCHA and anti-bot tasks in authorized testing

Dev Tools ·

liarjs.dev

Scanner that cross-checks browser JavaScript fingerprint against network layer

Dev Tools ·

AntiBrow

Antidetect browser for managing multiple browser identities with real-device

Dev Tools ·

HostlessWP

Open source CLI to move WordPress to Cloudflare Workers

Dev Tools ·

deed.page

Permanent web hosting with an API for AI agents

Dev Tools ·

Rowflare

Open-source Airtable alternative running on your Cloudflare account

Dev Tools ·