MCPcopy Index your code
hub / github.com/bigskysoftware/_hyperscript / registerModule

Method registerModule

src/core/kernel.js:348–354  ·  view source on GitHub ↗

* Register all exported parse element classes from a module. * Iterates over module exports and registers any class with * a static `parse` method and appropriate metadata.

(module)

Source from the content-addressed store, hash-verified

346 * a static `parse` method and appropriate metadata.
347 */
348 registerModule(module) {
349 for (const exported of Object.values(module)) {
350 if (typeof exported === 'function' && exported.parse) {
351 this.registerParseElement(exported);
352 }
353 }
354 }
355
356 addLeafExpression(name, definition) {
357 this.#leafExpressions.push(name);

Callers 1

_hyperscript.jsFile · 0.45

Calls 1

registerParseElementMethod · 0.95

Tested by

no test coverage detected