feat(formatter): Add replace transformer to text action
This commit is contained in:
@@ -8,6 +8,7 @@ import extractNumber from './options/extract-number';
|
||||
import lowercase from './options/lowercase';
|
||||
import pluralize from './options/pluralize';
|
||||
import trimWhitespace from './options/trim-whitespace';
|
||||
import replace from './options/replace';
|
||||
|
||||
const options: IJSONObject = {
|
||||
capitalize,
|
||||
@@ -19,6 +20,7 @@ const options: IJSONObject = {
|
||||
lowercase,
|
||||
pluralize,
|
||||
trimWhitespace,
|
||||
replace,
|
||||
};
|
||||
|
||||
export default {
|
||||
|
@@ -0,0 +1,28 @@
|
||||
const replace = [
|
||||
{
|
||||
label: 'Input',
|
||||
key: 'input',
|
||||
type: 'string' as const,
|
||||
required: true,
|
||||
description: 'Text that you want to search for and replace values.',
|
||||
variables: true,
|
||||
},
|
||||
{
|
||||
label: 'Find',
|
||||
key: 'find',
|
||||
type: 'string' as const,
|
||||
required: true,
|
||||
description: 'Text that will be searched for.',
|
||||
variables: true,
|
||||
},
|
||||
{
|
||||
label: 'Replace',
|
||||
key: 'replace',
|
||||
type: 'string' as const,
|
||||
required: false,
|
||||
description: 'Text that will replace the found text.',
|
||||
variables: true,
|
||||
},
|
||||
];
|
||||
|
||||
export default replace;
|
Reference in New Issue
Block a user