Socket
Socket
Sign inDemoInstall

@phosphor/commands

Package Overview
Dependencies
Maintainers
3
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@phosphor/commands - npm Package Compare versions

Comparing version 1.6.0 to 1.6.1

4

lib/index.d.ts

@@ -679,2 +679,6 @@ import { ReadonlyJSONObject } from '@phosphor/coreutils';

/**
* Format a keystroke for display on the local system.
*/
function formatKeystroke(keystroke: string): string;
/**
* Create a normalized keystroke for a `'keydown'` event.

@@ -681,0 +685,0 @@ *

@@ -627,2 +627,36 @@ "use strict";

/**
* Format a keystroke for display on the local system.
*/
function formatKeystroke(keystroke) {
var mods = '';
var parts = parseKeystroke(keystroke);
if (domutils_1.Platform.IS_MAC) {
if (parts.ctrl) {
mods += '\u2303 ';
}
if (parts.alt) {
mods += '\u2325 ';
}
if (parts.shift) {
mods += '\u21E7 ';
}
if (parts.cmd) {
mods += '\u2318 ';
}
}
else {
if (parts.ctrl) {
mods += 'Ctrl+';
}
if (parts.alt) {
mods += 'Alt+';
}
if (parts.shift) {
mods += 'Shift+';
}
}
return mods + parts.key;
}
CommandRegistry.formatKeystroke = formatKeystroke;
/**
* Create a normalized keystroke for a `'keydown'` event.

@@ -629,0 +663,0 @@ *

2

package.json
{
"name": "@phosphor/commands",
"version": "1.6.0",
"version": "1.6.1",
"description": "PhosphorJS - Commands",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc