@runbook/variables
TypeScript icon, indicating that this package has built-in type declarations

0.3.15 • Public • Published

Variables

This modules allows us to dereference variables. If the 'marker' is present in a string it will be replaced with something from the `dictionary

The markers can be <> or ${} or {} or {{}}. More can be added if desired

Examples strings:

This is a string with a variable ${path[1].to.variable}
This is a string with a variable ${path.to.variable|toLowerCase()}
This is a string with a variable ${path.to.variable|toSnakeCase()}
This is a string with a variable ${path.to.variable|toTitleCase()}
This is a string with a variable ${path.to.variable|default(defaultValue)}
This is a string with a variable ${path.to.variable|default(defaultValue)}

There are more complex examples in the tests

Readme

Keywords

Package Sidebar

Install

npm i @runbook/variables

Weekly Downloads

6

Version

0.3.15

License

MIT

Unpacked Size

27.5 kB

Total Files

14

Last publish

Collaborators

  • alikor
  • phil-rice