parseChord
Function Stability: stable
Parse a chord string. Returns null for anything invalid: empty, unknown key name, unknown/duplicated modifier, or
Shift on a digit/symbol (see the module doc).
Related guide: Commands and keymap →
Signature
TypeScript
import { parseChord } from '@aionbuilders/nabu/extend';TypeScript
function parseChord(text: string, options?: object): Chord | nullParameters
| Parameter | Type | Default | Description |
|---|---|---|---|
text | string | n/a | n/a |
optionsoptional | object | {} | n/a |
options.platformoptional | Platform | n/a | n/a |
Returns
Chord | null
Source: src/lib/utils/keys.js:70