Skip to content

Commit

Permalink
Update reach template documentation (#370)
Browse files Browse the repository at this point in the history
* Update reach template documentation

* Fix spacing in docs example

Co-authored-by: devin ivy <devin@bigroomstudios.com>
  • Loading branch information
jonathansamines and devinivy authored Sep 7, 2021
1 parent fcc7ba6 commit 4c05eee
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions API.md
Original file line number Diff line number Diff line change
Expand Up @@ -265,11 +265,10 @@ Replaces string parameters (`{name}`) with their corresponding object key values
- `options` - optional [`reach()`](#reachobj-chain-options) options.

```javascript
const template = '1+{a.b.c}=2';
const obj = { a: { b: { c: 1 } } };

const chain = 'a.b.c';
const obj = {a : {b : { c : 1}}};

Hoek.reachTemplate(obj, '1+{a.b.c}=2'); // returns '1+1=2'
Hoek.reachTemplate(obj, template); // returns '1+1=2'
```

#### stringify(...args)
Expand Down

0 comments on commit 4c05eee

Please sign in to comment.