Compare commits
1 Commits
aut-1332
...
stringify-
Author | SHA1 | Date | |
---|---|---|---|
![]() |
ab4abd590a |
@@ -16,6 +16,7 @@ import trimWhitespace from './transformers/trim-whitespace.js';
|
|||||||
import useDefaultValue from './transformers/use-default-value.js';
|
import useDefaultValue from './transformers/use-default-value.js';
|
||||||
import parseStringifiedJson from './transformers/parse-stringified-json.js';
|
import parseStringifiedJson from './transformers/parse-stringified-json.js';
|
||||||
import createUuid from './transformers/create-uuid.js';
|
import createUuid from './transformers/create-uuid.js';
|
||||||
|
import stringifyJson from './transformers/stringify-json.js';
|
||||||
|
|
||||||
const transformers = {
|
const transformers = {
|
||||||
base64ToString,
|
base64ToString,
|
||||||
@@ -34,6 +35,7 @@ const transformers = {
|
|||||||
useDefaultValue,
|
useDefaultValue,
|
||||||
parseStringifiedJson,
|
parseStringifiedJson,
|
||||||
createUuid,
|
createUuid,
|
||||||
|
stringifyJson,
|
||||||
};
|
};
|
||||||
|
|
||||||
export default defineAction({
|
export default defineAction({
|
||||||
@@ -63,6 +65,7 @@ export default defineAction({
|
|||||||
{ label: 'Extract Number', value: 'extractNumber' },
|
{ label: 'Extract Number', value: 'extractNumber' },
|
||||||
{ label: 'Lowercase', value: 'lowercase' },
|
{ label: 'Lowercase', value: 'lowercase' },
|
||||||
{ label: 'Parse stringified JSON', value: 'parseStringifiedJson' },
|
{ label: 'Parse stringified JSON', value: 'parseStringifiedJson' },
|
||||||
|
{ label: 'Stringify JSON', value: 'stringifyJson' },
|
||||||
{ label: 'Pluralize', value: 'pluralize' },
|
{ label: 'Pluralize', value: 'pluralize' },
|
||||||
{ label: 'Replace', value: 'replace' },
|
{ label: 'Replace', value: 'replace' },
|
||||||
{ label: 'String to Base64', value: 'stringToBase64' },
|
{ label: 'String to Base64', value: 'stringToBase64' },
|
||||||
|
@@ -0,0 +1,7 @@
|
|||||||
|
const stringifyJson = ($) => {
|
||||||
|
const input = $.step.parameters.input;
|
||||||
|
|
||||||
|
return JSON.stringify(input);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default stringifyJson;
|
@@ -13,6 +13,7 @@ import encodeUri from './text/encode-uri.js';
|
|||||||
import trimWhitespace from './text/trim-whitespace.js';
|
import trimWhitespace from './text/trim-whitespace.js';
|
||||||
import useDefaultValue from './text/use-default-value.js';
|
import useDefaultValue from './text/use-default-value.js';
|
||||||
import parseStringifiedJson from './text/parse-stringified-json.js';
|
import parseStringifiedJson from './text/parse-stringified-json.js';
|
||||||
|
import stringifyJson from './text/stringify-json.js';
|
||||||
import performMathOperation from './numbers/perform-math-operation.js';
|
import performMathOperation from './numbers/perform-math-operation.js';
|
||||||
import randomNumber from './numbers/random-number.js';
|
import randomNumber from './numbers/random-number.js';
|
||||||
import formatNumber from './numbers/format-number.js';
|
import formatNumber from './numbers/format-number.js';
|
||||||
@@ -40,6 +41,7 @@ const options = {
|
|||||||
formatPhoneNumber,
|
formatPhoneNumber,
|
||||||
formatDateTime,
|
formatDateTime,
|
||||||
parseStringifiedJson,
|
parseStringifiedJson,
|
||||||
|
stringifyJson,
|
||||||
};
|
};
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
const useDefaultValue = [
|
const parseStringifiedJson = [
|
||||||
{
|
{
|
||||||
label: 'Input',
|
label: 'Input',
|
||||||
key: 'input',
|
key: 'input',
|
||||||
@@ -9,4 +9,4 @@ const useDefaultValue = [
|
|||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
export default useDefaultValue;
|
export default parseStringifiedJson;
|
||||||
|
@@ -0,0 +1,12 @@
|
|||||||
|
const stringifyJson = [
|
||||||
|
{
|
||||||
|
label: 'Input',
|
||||||
|
key: 'input',
|
||||||
|
type: 'string',
|
||||||
|
required: true,
|
||||||
|
description: 'JSON to stringify.',
|
||||||
|
variables: true,
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
export default stringifyJson;
|
Reference in New Issue
Block a user