UNPKG

debugging-aid

Version:

Experimental tools for debugging Node.js apps without pausing

17 lines (15 loc) 320 B
// multiple resolves const work = (input) => new Promise((resolve, reject) => { /* eslint-disable */ switch (input) { case 1: resolve('ok') case 2: resolve('not again') default: setTimeout(() => { resolve('later') }, 1000) } }) work(1).then(console.log, console.error)