mirror of
https://github.com/Kir-Antipov/mc-publish.git
synced 2024-11-25 09:51:01 -05:00
Made enum for known parameter factory options
This commit is contained in:
parent
c2a959f05a
commit
661974ccb8
1 changed files with 49 additions and 0 deletions
49
src/utils/actions/action-parameter-factory-options.ts
Normal file
49
src/utils/actions/action-parameter-factory-options.ts
Normal file
|
@ -0,0 +1,49 @@
|
|||
/**
|
||||
* Representing the known options for the action parameter factory function.
|
||||
*/
|
||||
export enum ActionParameterFactoryOptions {
|
||||
/**
|
||||
* Determines if the input string should be split into an array of strings.
|
||||
*
|
||||
* Default value is `true` if the type represents an array, and `false` otherwise.
|
||||
*/
|
||||
SPLIT = "split",
|
||||
|
||||
/**
|
||||
* If `split` is `true`, this is used to divide the input string into an array of strings.
|
||||
* Otherwise, it's unused.
|
||||
*
|
||||
* Default value is `/\r?\n/g`.
|
||||
*/
|
||||
SEPARATOR = "separator",
|
||||
|
||||
/**
|
||||
* If `split` is set to `true`, this indicates whether the factory/converter function
|
||||
* should accept the input array as a whole or process its values individually and then concatenate them into a new array.
|
||||
*
|
||||
* Default value is the same as `split`.
|
||||
*/
|
||||
PROCESS_SEPARATELY = "processSeparately",
|
||||
|
||||
/**
|
||||
* If `true`, trims whitespace from the beginning and end of each entry in the array.
|
||||
*
|
||||
* Default value is the same as `split`.
|
||||
*/
|
||||
TRIM_ENTRIES = "trimEntries",
|
||||
|
||||
/**
|
||||
* If `true`, removes empty entries from the array after processing.
|
||||
*
|
||||
* Default value is the same as `split`.
|
||||
*/
|
||||
REMOVE_EMPTY_ENTRIES = "removeEmptyEntries",
|
||||
|
||||
/**
|
||||
* The depth level specifying how deep a nested array structure should be flattened.
|
||||
* Passes the value to Array.prototype.flat() method.
|
||||
*
|
||||
* Default value is `1`.
|
||||
*/
|
||||
FLAT_DEPTH = "flatDepth",
|
||||
}
|
Loading…
Reference in a new issue