1
0
Fork 0

feat(markdown): Docs for utils.mergeOptions()

This commit is contained in:
joostdecock 2023-06-11 15:57:16 +02:00
parent 631ea8a50d
commit a532a6e010
3 changed files with 36 additions and 1 deletions

View file

@ -17,16 +17,23 @@ The `toAbs` property should hold a function with the following
signature:
```js
function toAbs(percentage, settings) {
function toAbs(percentage, settings, mergeOptions) {
// return value in millimeter here
}
```
The first parameter is the percentage value provided by the user (for example
`0.5` for `50%`).
The second parameter holds the pattern's [settings](/reference/settings) object
which holds -- among other things -- the measurements provided by the user.
The third parameter should be the return value of
[utils.mergeOptions()](/reference/api/utils/mergeoptions), which provides an
object with all option values populated. Although this parameter is not
required for simple values based on measurements, it is often required when the
result depends on several options.
## Example
In our example above, let's say that the `chestEase` option is