fix(formatter): capitalize all words without trimming any data (#1216)
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user