No Description

example.mjs 221B

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