Size of the queue, filtered by the given options. For example, this can be used to find the number of items remaining in the queue with a specific priority level.
(options: Readonly<Partial<EnqueueOptionsType>>)
| 792 | For example, this can be used to find the number of items remaining in the queue with a specific priority level. |
| 793 | */ |
| 794 | sizeBy(options: Readonly<Partial<EnqueueOptionsType>>): number { |
| 795 | // eslint-disable-next-line unicorn/no-array-callback-reference |
| 796 | return this.#queue.filter(options).length; |
| 797 | } |
| 798 | |
| 799 | /** |
| 800 | Number of running items (no longer in the queue). |