Skip to content

Commit

Permalink
fix: move random value variables into correct section.
Browse files Browse the repository at this point in the history
  • Loading branch information
svrnm committed Jan 3, 2022
1 parent a9278dc commit de9ddf0
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions USAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ into a personalized experience for your audience.**
* [Authors and more](#authors-and-more)
* [Variables](#variables)
* [Global Variables](#global-variables)
* [Imports: Reuse existing configurations](#imports-reuse-existing-configurations)
* [Variables with random value](#variables-with-random-value)
* [Imports: Reuse existing configurations](#imports-reuse-existing-configurations)
* [Snippets](#snippets)
* [Generic Commands](#generic-commands)
* [Run regular expressions](#run-regular-expressions)
Expand Down Expand Up @@ -199,6 +199,18 @@ value in the background.
If you go to `Settings > Global Variables` you can provide variables that are useable in all your configurations.
Here you also can provide colors via a picker and images via upload which will be base64 encoded for you.

### Variables with random value

Sometimes you don't care about the value of the replacement itself or you want to provide some randomness in the
replacement, e.g.when providing a name of a person. In this case you can use the special variables of the form
`${chance.<function>(<attributes>)}`, which provide you access to the methods provided by [Chance](https://chancejs.com/):

```ini
John Doe = ${chance.name()}
Berlin = ${chance.city()}
Your error code is 404 = Your error code is ${chance.integer({min: 400, max: 599})}
```

## Imports: Reuse existing configurations

Like variables imports make your configurations reusable. Introduced by a plus sign (`+`) you can load one configuration
Expand Down Expand Up @@ -231,18 +243,6 @@ Mountain View = Dubai
Note, that also variables are imported. So if you have a variable $customersHeadquarter in your `CitiesTemplate`
configuration, you can overwrite this value in the importing configuration.

### Variables with random value

Sometimes you don't care about the value of the replacement itself or you want to provide some randomness in the
replacement, e.g.when providing a name of a person. In this case you can use the special variables of the form
`${chance.<function>(<attributes>)}`, which provide you access to the methods provided by [Chance](https://chancejs.com/):

```ini
John Doe = ${chance.name()}
Berlin = ${chance.city()}
Your error code is 404 = Your error code is ${chance.integer({min: 400, max: 599})}
```

## Snippets

By default, you have an optional feature enabled that is called `Autocomplete`. This also allows you to use snippets.
Expand Down

0 comments on commit de9ddf0

Please sign in to comment.