formatChord
Function Stability: stable
Format a chord for display, per platform. macOS: ⌃⌥⇧⌘ + key, no separator (⌘⇧Z, ⌘↩). Elsewhere: Ctrl+Alt+Shift+Meta+Key
(Ctrl+Shift+Z, Ctrl+Enter).
Related guide: Commands and keymap →
Signature
TypeScript
import { formatChord } from '@aionbuilders/nabu';TypeScript
function formatChord(chord: string | Chord, options?: object): stringParameters
| Parameter | Type | Default | Description |
|---|---|---|---|
chord | string | Chord | n/a | a chord string (parsed with |
optionsoptional | object | {} | n/a |
options.platformoptional | Platform | n/a | n/a |
Returns
string
'' for an invalid chord string
Source: src/lib/utils/keys.js:192