来自这些流:
得到这样的东西:
[ "sales", "users"]
答案 0 :(得分:1)
fromStream('$streams')
.when({
$init: function () {
return []
},
$any: function (s, e) {
var category = e.streamId.split("-")[0];
if (s.includes(category))
return;
s.push(category);
}
})