MCPcopy Create free account
hub / github.com/bigskysoftware/_hyperscript / addCommand

Method addCommand

www/js/_hyperscript.js:1560–1564  ·  view source on GitHub ↗
(keyword, definition)

Source from the content-addressed store, hash-verified

1558 this.#grammar[name] = definition;
1559 }
1560 addCommand(keyword, definition) {
1561 var commandGrammarType = keyword + "Command";
1562 this.#grammar[commandGrammarType] = definition;
1563 this.#commands[keyword] = definition;
1564 }
1565 addCommands(...commandClasses) {
1566 for (const CommandClass of commandClasses) {
1567 if (!CommandClass.keyword) {

Callers 7

addCommandsMethod · 0.45
registerParseElementMethod · 0.45
lFunction · 0.45
hdbPluginFunction · 0.45
hdbPluginFunction · 0.45
lFunction · 0.45
registerCommandsFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected