Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const updatePaletteTitle = () => {
const binding = find(
app.commands.keyBindings,
b => b.command === CommandIDs.activate
);
if (binding) {
const ks = CommandRegistry.formatKeystroke(binding.keys.join(' '));
palette.title.caption = `Commands (${ks})`;
} else {
palette.title.caption = 'Commands';
}
};
updatePaletteTitle();