Frontend/25_01_07/mai/node_modules/fastq/example.mjs
szabomarton 7f4a15b9c3 asd
2025-01-28 11:38:27 +01:00

12 lines
221 B
JavaScript

import { promise as queueAsPromised } from './queue.js'
/* eslint-disable */
const queue = queueAsPromised(worker, 1)
console.log('the result is', await queue.push(42))
async function worker (arg) {
return 42 * 2
}