feat(formatter): Add replace transformer to text action

This commit is contained in:
Faruk AYDIN
2023-09-01 17:51:23 +02:00
committed by Ali BARIN
parent feb613cb6d
commit e19340f1e0
4 changed files with 45 additions and 0 deletions

View File

@@ -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 {

View File

@@ -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;