feat(formatter): add trim whitespace transformer to text action (#1261)

This commit is contained in:
Ömer Faruk Aydın
2023-09-01 14:07:50 +02:00
committed by GitHub
parent 200e6d9905
commit afa6bdfa44
4 changed files with 25 additions and 0 deletions

View File

@@ -7,6 +7,7 @@ import extractEmailAddress from './options/extract-email-address';
import extractNumber from './options/extract-number';
import lowercase from './options/lowercase';
import pluralize from './options/pluralize';
import trimWhitespace from './options/trim-whitespace';
const options: IJSONObject = {
capitalize,
@@ -17,6 +18,7 @@ const options: IJSONObject = {
extractNumber,
lowercase,
pluralize,
trimWhitespace,
};
export default {

View File

@@ -0,0 +1,12 @@
const trimWhitespace = [
{
label: 'Input',
key: 'input',
type: 'string' as const,
required: true,
description: 'Text you want to remove leading and trailing spaces.',
variables: true,
},
];
export default trimWhitespace;