]>
git.r.bdr.sh - rbdr/corona-regeln/blob - src/lib/stores/rules.js
1 import { readable
} from 'svelte/store';
2 import { generate
} from '$lib/rule_generator';
8 export const getRules = function () {
10 return readable([], function (set) {
15 for (let i
= 0; i
< internals
.ruleCount
; ++i
) {
16 rules
.push(await
generate());
19 set(rules
.sort(() => Math
.random() - 0.5));
22 return function stop() {};