Helper to create style filters.
This commit is contained in:
parent
92c2d37e3b
commit
5b9c2e3ca4
|
@ -0,0 +1,14 @@
|
||||||
|
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) });
|
Loading…
Reference in New Issue