dyomedea/helper.ts

15 lines
452 B
TypeScript
Raw Permalink Normal View History

2023-01-31 10:56:40 +00:00
import { overlayDefinitions } from './src/components/overlays/overlay-definitions';
let filters: any[] = ['any'];
Object.keys(overlayDefinitions).forEach((key) => {
const definition = overlayDefinitions[key];
let filter: any[] = ['in', key];
Object.keys(definition).forEach((subKey) => {
filter = [...filter, subKey];
});
filters = [...filters, filter];
});
console.log({ overlayDefinitions, filters, json: JSON.stringify(filters) });