@hscmap/keybind
Advanced tools
Comparing version 0.0.0 to 0.0.1
@@ -32,2 +32,4 @@ "use strict"; | ||
KeyCombination.prototype.html = function () { | ||
var m = this.key.match(/^Key([A-Z])$/); | ||
var key = m ? m[1] : this.key; | ||
return [ | ||
@@ -38,3 +40,3 @@ this.alt ? '⌥' : '', | ||
this.meta ? '⌘' : '', | ||
this.key.toUpperCase() | ||
key | ||
].join(''); | ||
@@ -41,0 +43,0 @@ }; |
{ | ||
"name": "@hscmap/keybind", | ||
"version": "0.0.0", | ||
"version": "0.0.1", | ||
"main": "./lib/index.js", | ||
@@ -5,0 +5,0 @@ "types": "./lib/index.d.ts", |
@@ -34,2 +34,4 @@ class KeyCombination { | ||
html() { | ||
const m = this.key.match(/^Key([A-Z])$/) | ||
const key = m ? m[1] : this.key | ||
return [ | ||
@@ -40,3 +42,3 @@ this.alt ? '⌥' : '', | ||
this.meta ? '⌘' : '', | ||
this.key.toUpperCase() | ||
key | ||
].join('') | ||
@@ -43,0 +45,0 @@ } |
8219
197