feat(formatter): add trim whitespace transformer to text action (#1261)
This commit is contained in:
@@ -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 {
|
||||
|
@@ -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;
|
Reference in New Issue
Block a user