1.0.0 • Published 2 years ago
map-values-resolver v1.0.0
map-resolver
Table of Contents
About
Simple plugin that resolves variable in an input Map by evaluating variables (marked by a delimiter and referencing a map value using map keys) with their value.
Example
If the input map is:
Map(2) {
'key1' => 'Value1',
'key2' => 'Value2 ${key1}',
}
The output would be:
Map(2) {
'key1' => 'Value1',
'key2' => 'Value2 Value1',
}
Usage
resolver(map: Map<string, string>, delimiter?: {
start: string;
end: string;
})
- Options:
map
: Map<string, string> The input mapThe map keys and values should be of type string
delimiter
: {start
: string,end
: string} (Optional) The used delimeterThe second parameter is optional, if not specified the default delimiter (${KEY}) will be used
1.0.0
2 years ago