How do I write a swtich for the following conditional?
If the url contains \"foo\", then settings.base_url is \"bar\".
The following is achi
You could also make use of the default case like this:
switch (name) { case 't': return filter.getType(); case 'c': return (filter.getCategory()); default: if (name.startsWith('f-')) { return filter.getFeatures({type: name}) } }