camel case

This commit is contained in:
Daniel García Aubert
2019-11-14 12:17:26 +01:00
parent f9082dad94
commit d4719d5707
19 changed files with 139 additions and 139 deletions
@@ -90,10 +90,10 @@ function createAggregationColumnNamesValidator (mapconfig) {
function createAggregateFunctionValidator (mapconfig, validAggregatedFunctions) {
return function validateAggregateFunction (value, key, index) {
Object.keys(value).forEach((columnName) => {
const { aggregate_function } = value[columnName];
const { aggregate_function: aggregateFunction } = value[columnName];
if (!validAggregatedFunctions.includes(aggregate_function)) {
const message = `Unsupported aggregation function ${aggregate_function},` +
if (!validAggregatedFunctions.includes(aggregateFunction)) {
const message = `Unsupported aggregation function ${aggregateFunction},` +
` valid ones: ${validAggregatedFunctions.join(', ')}`;
throw createLayerError(message, mapconfig, index);
}
@@ -104,9 +104,9 @@ function createAggregateFunctionValidator (mapconfig, validAggregatedFunctions)
function createAggregatedColumnValidator (mapconfig) {
return function validateAggregatedColumn (value, key, index) {
Object.keys(value).forEach((columnName) => {
const { aggregated_column } = value[columnName];
const { aggregated_column: aggregatedColumn } = value[columnName];
if (typeof aggregated_column !== 'string' || aggregated_column <= 0) {
if (typeof aggregatedColumn !== 'string' || aggregatedColumn <= 0) {
const message = 'Invalid aggregated column, should be a non empty string';
throw createLayerError(message, mapconfig, index);
}