1.3.0 • Published 11 months ago

@html_first/simple_queue v1.3.0

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

simple_queue

  • made for queue handler for @html_first internals;
  • but are generally capable enough for general usages;

how to install

npm i @html_first/simple_queue

usage

  • debouncing using unique id
// @ts-check

import { _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-check

import { _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 */)
);
1.2.0

1 year ago

1.3.0

11 months ago

1.2.1

1 year ago

1.1.1

1 year ago

1.1.0

1 year ago

1.1.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago

0.8.0

1 year ago