Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
au2 committed Oct 21, 2015
1 parent e925208 commit 39d76fd
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ The following are the list of all keys that have special meaning in template obj
- [`single`](#single)
- [`firstOf`](#firstOf)
- [`assign`](#assign)
- [`ignoreDeep`](#ignoreDeep)

<a name="dataKey" />
#### `dataKey` rule
Expand Down Expand Up @@ -864,6 +865,30 @@ var r = j2j.run(template, {
console.log(r); // {id: 'JDOE', last: 'DOE', first: 'JOE'}
```

<a name="ignoreDeep" />
#### `ignoreDeep` rule

This rule can be used when dots in [content](#content) keys are part of the key rather than describing a path
```js
var template = {
content: {
'name.last': {
dataKey: 'familyName'
},
'name.first': {
dataKey: 'givenName'
}
},
ignoreDeep: true
};

var r = j2j.run(template, {
familyName: 'DOE',
givenName: 'JOE'
});
console.log(r); // {'name.last': 'DOE', 'name.first': 'JOE'}
```

## Overrides

Each engine instance `j2j` contains all the implementation details as functions in the following keys:
Expand Down

0 comments on commit 39d76fd

Please sign in to comment.