0.1.0 • Published 1 year ago

asyncqueue-custom v0.1.0

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year ago

ℹ️ Before submitting an issue to this repo - Ensure it's a issue with the code in this repo, you may meet some issue from rollup config - please take a look in this document Rollup and vite Vite

Why

Being a front-end engineer, especially deal with asynchronous coding, with some context special, queue loop stack in default browser not run like what you want. So I write this lib for difference mode: single parallel combine

  • Original event loop:

  • With AsyncQueue mode single

  • With AsyncQueue mode parallel

  • With AsyncQueue mode combine

Running it on own's

  • Clone the project:
$ git clone https://github.com/b0yblake/AsyncQueue
  • Install:
$ cd csslayout
$ yarn

Usage

import { createAsyncQueue } from "AsyncQueue";
const queueProcess = createAsyncQueue();

// Some async function
function async doSomeThing() {}

// Push to list
await queueProcess.push(doSomeThing);

Explain

Contributing

PRs are welcomed. If you think there are any missing useful layouts or patterns, please create an issue or submit a PR.

If there is any issue, it will be logged in the tslint.log file.

About

This project is developed by Nguyen Huu Lich. I love building products and sharing knowledge.

Be my friend on