0.0.4 • Published 5 years ago
@xtrctio/wait-for-keypress v0.0.4
wait-for-keypress
Usage
const waitForKeypress = require('@xtrctio/wait-for-keypress');
(async () => {
const result = await waitForKeypress({a: 'Success!', f: 'Failure!'});
})()
API
waitForKeypress(keyConfig) ⇒ Promise.<*>
Wait for configured keys to be pressed
Kind: global function
Param | Type | Description |
---|---|---|
keyConfig | object | Object matching keys to their return value |