Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
vscode.window.showInputBox().then(userInput => {
if (userInput === undefined) {
return;
} else if (userInput === 'CONFIG') {
browserScope = vscode.workspace.getConfiguration('caniuse').browser_scope;
userInput = (browserScope !== null) ? browserScope : '> 5%, last 2 versions';
}
try {
api.setBrowserScope(userInput);
} catch (e) {
vscode.window.showErrorMessage(e.message);
return;
}
vscode.window.setStatusBarMessage(`BrowserScope updated $(check)`, 3000);
});
}