After ESLint in Styler

This commit is contained in:
Christian Paul 2017-12-23 00:07:42 -08:00
parent 804b55076d
commit 8673da8ecb

View File

@ -105,9 +105,9 @@ class Styler {
}); });
case '==': case '==':
return (feature) => feature.properties[filter[1]] === filter[2]; return (feature) => feature.properties[filter[1]] === filter[2];
case "!=": case '!=':
return (feature) => feature.properties[filter[1]] !== filter[2]; return (feature) => feature.properties[filter[1]] !== filter[2];
case "in": case 'in':
return (feature) => !!filter.slice(2).find((value) => { return (feature) => !!filter.slice(2).find((value) => {
return feature.properties[filter[1]] === value; return feature.properties[filter[1]] === value;
}); });
@ -115,17 +115,17 @@ class Styler {
return (feature) => !filter.slice(2).find((value) => { return (feature) => !filter.slice(2).find((value) => {
return feature.properties[filter[1]] === value; return feature.properties[filter[1]] === value;
}); });
case "has": case 'has':
return (feature) => !!feature.properties[filter[1]]; return (feature) => !!feature.properties[filter[1]];
case "!has": case '!has':
return (feature) => !feature.properties[filter[1]]; return (feature) => !feature.properties[filter[1]];
case ">": case '>':
return (feature) => feature.properties[filter[1]] > filter[2]; return (feature) => feature.properties[filter[1]] > filter[2];
case ">=": case '>=':
return (feature) => feature.properties[filter[1]] >= filter[2]; return (feature) => feature.properties[filter[1]] >= filter[2];
case "<": case '<':
return (feature) => feature.properties[filter[1]] < filter[2]; return (feature) => feature.properties[filter[1]] < filter[2];
case "<=": case '<=':
return (feature) => feature.properties[filter[1]] <= filter[2]; return (feature) => feature.properties[filter[1]] <= filter[2];
default: default:
return () => true; return () => true;