« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/util/aggregate.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/util/aggregate.js b/src/util/aggregate.js
index 5429e640..3ad8bdba 100644
--- a/src/util/aggregate.js
+++ b/src/util/aggregate.js
@@ -124,6 +124,13 @@ export function openAggregate({
     });
   };
 
+  aggregate.contain = (results) => {
+    return {
+      aggregate,
+      result: aggregate.receive(results),
+    };
+  };
+
   aggregate.map = (...args) => {
     const parent = aggregate;
     const {result, aggregate: child} = mapAggregate(...args);