Answers for "how to detech ctrl+C exist in nodejs"

0

how to detech ctrl+C exist in nodejs

export const detectKeyboard = () => {
	process.openStdin().on('keypress', function (_, key) {
		if (key && key.name === 'c' && key.ctrl) {
			deleteData()
			process.exit()
		}
	})
}
Posted by: Guest on July-15-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language