xen-orchestra/@vates/coalesce-calls/USAGE.md
2020-06-29 15:39:14 +02:00

249 B

import { coalesceCalls } from '@vates/coalesce-calls'

const connect = coalesceCalls(async function () {
  // async operation
})

connect()

// the previous promise result will be returned if the operation is not
// complete yet
connect()