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

Method addCommand

www/js/_hyperscript.esm.js:1558–1562  ·  view source on GitHub ↗
(keyword, definition)

Source from the content-addressed store, hash-verified

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

Callers 2

addCommandsMethod · 0.45
registerParseElementMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected