MCPcopy Index your code
hub / github.com/react/react / confirm

Function confirm

scripts/devtools/utils.js:65–83  ·  view source on GitHub ↗
(message, exitFunction)

Source from the content-addressed store, hash-verified

63}
64
65async function confirm(message, exitFunction) {
66 console.log('');
67
68 const {confirmation} = await inquirer.prompt({
69 name: 'confirmation',
70 type: 'confirm',
71 message,
72 });
73
74 console.log('');
75
76 if (!confirmation) {
77 if (typeof exitFunction === 'function') {
78 exitFunction();
79 }
80
81 process.exit(0);
82 }
83}
84
85async function confirmContinue(exitFunction) {
86 await confirm('Continue the release?', exitFunction);

Callers 4

mainFunction · 0.70
publishToNPMFunction · 0.70
confirmContinueFunction · 0.70
mainFunction · 0.70

Calls 1

exitMethod · 0.80

Tested by

no test coverage detected