Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
Xmo edited this page Oct 31, 2022 · 1 revision

Welcome to the once-init wiki!

It is a package helps make asynchronous function execution manageable.

封装可控的 async function。

你可以让同一个 async function 不会在同一时间内被执行两次,以防止发出重复的请求。

你可以让第二次执行 async function ,直接返回第一次执行的结果,而不是重复执行函数。

解决大量的相同请求的问题。

详细且精确的 Typescript 检查。

安装

# 浏览器环境和nodejs环境都可用
npm install once-init

简介

once-init 的核心思想是缓存和执行队列;

Clone this wiki locally

AltStyle によって変換されたページ (->オリジナル) /