From a93d8afa984f3a4cf5ad1064f8e991544b5ebc5d Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Tue, 4 Apr 2023 13:29:00 -0300 Subject: infra: new 'multiple' option in quickEvaluate --- src/content-function.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src') diff --git a/src/content-function.js b/src/content-function.js index 377eecc9..30e0ccc3 100644 --- a/src/content-function.js +++ b/src/content-function.js @@ -338,7 +338,20 @@ export function quickEvaluate({ name, args = [], + multiple = null, }) { + if (multiple !== null) { + return multiple.map(opts => + quickEvaluate({ + contentDependencies: allContentDependencies, + extraDependencies: allExtraDependencies, + + ...opts, + name: opts.name ?? name, + args: opts.args ?? args, + })); + } + const treeInfo = getRelationsTree(allContentDependencies, name, ...args); const flatTreeInfo = flattenRelationsTree(treeInfo); const {root, relationIdentifier, flatRelationSlots} = flatTreeInfo; -- cgit 1.3.0-6-gf8a5