mirror of
https://kevinblog.sytes.net/Code/Jibo-Revival-Group/JiboViteDocs.git
synced 2026-06-15 17:36:19 +00:00
10 lines
199 B
JavaScript
10 lines
199 B
JavaScript
import { promise as queueAsPromised } from './queue.js'
|
|
|
|
const queue = queueAsPromised(worker, 1)
|
|
|
|
console.log('the result is', await queue.push(42))
|
|
|
|
async function worker (arg) {
|
|
return 42 * 2
|
|
}
|