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

Method resolve

www/js/_hyperscript.js:8210–8237  ·  view source on GitHub ↗
(ctx, { target })

Source from the content-addressed store, hash-verified

8208 return new _ShowCommand(targetExpr, when, arg, hideShowStrategy);
8209 }
8210 resolve(ctx, { target }) {
8211 var runtime2 = ctx.meta.runtime;
8212 var cmd = this;
8213 runtime2.nullCheck(target, this.targetExpr);
8214 if (this.when) {
8215 var result = runtime2.implicitLoopWhen(
8216 target,
8217 this.when,
8218 ctx,
8219 function(elt) {
8220 cmd.hideShowStrategy("show", elt, cmd.arg, runtime2);
8221 },
8222 function(elt) {
8223 cmd.hideShowStrategy("hide", elt, null, runtime2);
8224 }
8225 );
8226 if (result && result.then) {
8227 return result.then(function() {
8228 return runtime2.findNext(cmd, ctx);
8229 });
8230 }
8231 } else {
8232 runtime2.implicitLoop(target, function(elt) {
8233 cmd.hideShowStrategy("show", elt, cmd.arg, runtime2);
8234 });
8235 }
8236 return runtime2.findNext(this, ctx);
8237 }
8238 };
8239 var TakeCommand = class _TakeCommand extends Command {
8240 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