but are generally capable enough for general usages;
how to install
npm i @html_first/simple_queue
usage
debouncing using unique id
// @ts-checkimport{_Queue,_QueueObject}from'@html_first/simple_queue';$queue=new_Queue();$queue.assign(new_QueueObject('id'/** <- queue id to prevent spamming action button */,()=>{/** * - callback * - can also be async function */},false/** <- false or number debounce on each valid(sanitized from spam action */));
handles all with first in first out
// @ts-checkimport{_QueueFIFO,_QueueObjectFIFO}from'@html_first/simple_queue';$queue=new_QueueFIFO();$queue.assign(new_QueueObjectFIFO(()=>{/** * - callback * - can also be async function */},false/** <- false or number debounce on each valid(sanitized from spam action */));