Skip to content

Commit

Permalink
fix(formatter): capitalize all words without trimming any data (#1216)
Browse files Browse the repository at this point in the history
  • Loading branch information
farukaydin committed Aug 16, 2023
1 parent f89cff4 commit cbd1f47
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { IGlobalVariable } from '@automatisch/types';
import { startCase } from 'lodash';
import { capitalize as lodashCapitalize } from 'lodash';

const capitalize = ($: IGlobalVariable) => {
const input = $.step.parameters.input as string;
const capitalizedInput = input.replace(/\w+/g, lodashCapitalize);

return startCase(input);
return capitalizedInput;
};

export default capitalize;

0 comments on commit cbd1f47

Please sign in to comment.