Transformation

actions. Transformation

Transformation Actions

The static methods of this class allow rules to execute transformations using one of the various data transformation services.

Methods

(static) transform(type, fn, value) → {string}

Description:
  • Applies a transformation of a given type with some function to a value.

Source:
Parameters:
Name Type Description
type string

the transformation type, e.g. REGEX or MAP

fn string

the function to call, this value depends on the transformation type

value string

the value to apply the transformation to

Returns:

the transformed value or the original one, if there was no service registered for the given type or a transformation exception occurred

Type
string

(static) transformRaw(type, fn, value) → {string}

Description:
  • Applies a transformation of a given type with some function to a value.

Source:
Parameters:
Name Type Description
type string

the transformation type, e.g. REGEX or MAP

fn string

the function to call, this value depends on the transformation type

value string

the value to apply the transformation to

Throws:
Returns:

the transformed value

Type
string