From 75335c1d3ae16b6b5a8e3514cc008ad50a69d7ad Mon Sep 17 00:00:00 2001 From: Melissa Alvarez Date: Tue, 9 Jun 2020 10:49:36 -0400 Subject: [PATCH] update helper function name --- .../hooks/use_create_analytics_form/state.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/hooks/use_create_analytics_form/state.ts b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/hooks/use_create_analytics_form/state.ts index ec3eb8267b6a4..8a07704e39910 100644 --- a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/hooks/use_create_analytics_form/state.ts +++ b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/hooks/use_create_analytics_form/state.ts @@ -322,7 +322,7 @@ export const getJobConfigFromFormState = ( return jobConfig; }; -function getCamelCase(property: string): string { +function toCamelCase(property: string): string { const camelCased = property.replace(/_([a-z])/g, function (g) { return g[1].toUpperCase(); }); @@ -357,7 +357,7 @@ export function getCloneFormStateFromJobConfig( for (const key in analysisConfig) { if (analysisConfig.hasOwnProperty(key)) { - const camelCased = getCamelCase(key); + const camelCased = toCamelCase(key); // @ts-ignore resultState[camelCased] = analysisConfig[key]; }