map-values-resolver

1.0.0 • Public • Published

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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.0
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.0
    1

Package Sidebar

Install

npm i map-values-resolver

Weekly Downloads

1

Version

1.0.0

License

UNLICENSED

Unpacked Size

24.3 kB

Total Files

10

Last publish

Collaborators

  • aimad-majdou