Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function evaluateFilter(layerId, filter, feature, zoom) {
if (!(layerId in filterCache)) {
filterCache[layerId] = createFilter(filter);
}
zoomObj.zoom = zoom;
return filterCache[layerId](zoomObj, feature);
}
allLayers.forEach((l) => {
l.filterExpression = featureFilter(l.filter);
});
features.filter.loaded = true;