Skip to content

Latest commit

 

History

History
50 lines (34 loc) · 970 Bytes

File metadata and controls

50 lines (34 loc) · 970 Bytes

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 map

    The map keys and values should be of type string

    • delimiter: { start: string, end: string} (Optional) The used delimeter

    The second parameter is optional, if not specified the default delimiter (${KEY}) will be used