- 16 Feb 2023
- 3 Minutes to read
- DarkLight
Utilities
- Updated on 16 Feb 2023
- 3 Minutes to read
- DarkLight
Utility steps enable you to perform common actions to manipulate workflow data. These include extracting, parsing, validating, calculating, and many more. Utilities are not vendor based.
Array utils
Here's a list of supported array utilities. To learn more, check out examples for each one.
Utility name | Description |
---|---|
Append to array | Adds an object to the end of an existing array or instantiates (creates) an array to which objects will later be added. |
Chunk array | Divides an existing array into smaller arrays. |
Concat arrays | Combines two arrays into a single array. Objects that appear in both arrays are duplicated in the concatenated result. |
Extract field from records | Given a list of records and a field name, extract the value for the provided field name for each record. |
Filter array | Filters an array to produce a subset of the data. The result is based on the Filter func parameter. |
Get last item of array | Returns the last object in theprovided array. |
Join strings | Returns a single string of all objects in theprovided array, separated by the given delimiter. |
Prepend to array | Adds an object to the beginning of an existing array or instantiates (creates) an array to which objects can be added later. |
Reverse array | Reverses the order of the items in aprovided array. |
Rollup numeric array | Performs a rollup function on an array of numbers. |
Slice array | Returns a slice (section) of theprovided array. |
Slice array from start | Returns a slice (section) of theprovided array from the first object in the array up to the specific index. |
Slice array to end | Returns a slice (section) of theprovided array from the firstprovided index and up to and including the last object. |
Sort array | Sort the objects in theprovided array. Supports strings, numbers, and datetime strings. |
Subtract arrays | Compares two arrays (left and right) to receive 3 sub-arrays. |
Unique on array | Returns an array in which each input array member appears only once. |
Cryptographic utils
Here's a list of supported cryptographic utilities. To learn more, check out examples for each one.
Utility name | Description |
---|---|
Calculate MD5 | Calculates the MD5 hash of theprovided file. |
Calculate SHA1 | Calculates theSHA1 hash of theprovided file. |
Calculate SHA256 | Calculates theSHA256 hash of theprovided file. |
Cipher decrypt | Uses cipher to decrypt theprovided text. |
Cipher encrypt | Uses cipher to encrypt theprovided text. |
Decode JWT | Decodes theprovided JSON Web Token without its signature. |
Encode JWT | Uses HS256 to encode a JSON Web Token. Default claims are iat (issue time) and exp (expiration time). |
Generate random number | Generates a random number within the minimum and maximum values. |
Generate random string | Generates a random alphanumeric string. |
Generate UUID | Generates a UUID (universally unique identifier) string. |
Get TLS certificate information | Returns information about TLS/SSL certificates for theprovided endpoint. |
Date and time utils
Here's a list of supported date and time utilities. To learn more, check out examples for each one.
Utility name | Description |
---|---|
Calculate time and duration | Calculates and returns the duration (absolute) from theprovided date and time to/from the present moment. |
Convert date | Converts theprovided date to the specified new date format. |
Get date | Returns a time and date string according to theprovided format, time offset, timezone, and date. |
Encoding utils
Here's a list of supported encoding utilities. To learn more, check out examples for each one.
Utility name | Description |
---|---|
Convert CSV to JSON | Converts and outputs the provided CSV file to JSON format. |
Convert EML to JSON | Converts and outputs theprovided EML file to JSON format. |
Convert JSON to YAML | Converts and outputs theprovided JSON file to YAML format. |
Decode base64 | Decodes theprovided base64 string. |
Decode hex | Decodes theprovided Hex string. |
Decode JSON | Decodes and outputs theprovided JSON string to a JSON object. |
Decode URL | Decodes theprovided URL. |
Encode base64 | Encodes theprovided text in base64. |
Encode hex | Encodes theprovided text into Hex. |
Encode URL | Encodes theprovided URL to URL encoded format. |
String utils
Here's a list of supported string utilities. To learn more, check out examples for each one.
Utility name | Description |
---|---|
Convert string to lowercase | Converts and outputsall characters in the provided text to lowercase. |
Convert string to title case | Converts and outputs all characters in the provided text to title case. |
Convert string to uppercase | Converts and outputs all characters in the provided text to uppercase. |
Defang or refang entity | Defangs or refangs the provided IP, URL, or email address. |
Escape JSON string | Escapes the provided text so you can use it in JSON. |
Replace substring in text | Replaces one substring with another one in the provided text. |
Split text | Splits the provided text according to the given separator. |
Trim spaces before and after string | Trims (removes) the spaces at the beginning and the end of the provided text. |
Trim string characters | Trims (removes) all occurrences of the given characters from one or two edges of the provided text. |
Trim string prefix | Trims (removes) the prefix of the provided text. |
Trim string suffix | Trims (removes) the suffix of the provided text. |
Truncate text | Truncates (shortens) the provided text to the given limit. |