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

Method resolve

tools/common/_hyperscript.iife.js:7787–7814  ·  view source on GitHub ↗
(ctx, { target })

Source from the content-addressed store, hash-verified

7785 return new _ShowCommand(targetExpr, when, arg, hideShowStrategy);
7786 }
7787 resolve(ctx, { target }) {
7788 var runtime2 = ctx.meta.runtime;
7789 var cmd = this;
7790 runtime2.nullCheck(target, this.targetExpr);
7791 if (this.when) {
7792 var result = runtime2.implicitLoopWhen(
7793 target,
7794 this.when,
7795 ctx,
7796 function(elt) {
7797 cmd.hideShowStrategy("show", elt, cmd.arg, runtime2);
7798 },
7799 function(elt) {
7800 cmd.hideShowStrategy("hide", elt, null, runtime2);
7801 }
7802 );
7803 if (result && result.then) {
7804 return result.then(function() {
7805 return runtime2.findNext(cmd, ctx);
7806 });
7807 }
7808 } else {
7809 runtime2.implicitLoop(target, function(elt) {
7810 cmd.hideShowStrategy("show", elt, cmd.arg, runtime2);
7811 });
7812 }
7813 return runtime2.findNext(this, ctx);
7814 }
7815 };
7816 var TakeCommand = class _TakeCommand extends Command {
7817 static keyword = "take";

Callers

nothing calls this directly

Calls 4

nullCheckMethod · 0.45
implicitLoopWhenMethod · 0.45
findNextMethod · 0.45
implicitLoopMethod · 0.45

Tested by

no test coverage detected