Skip to content

Commit

Permalink
Merge pull request mde#155 from mde/fix-152
Browse files Browse the repository at this point in the history
Add warning for ejs.render(dataAndOptions)
  • Loading branch information
mde committed Apr 18, 2016
2 parents 2b388ca + bc66935 commit 3718a50
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,11 @@ ejs.render(str, data, options);
// => Rendered HTML string
```

You can also use the shortcut `ejs.render(dataAndOptions);` where you pass
It is also possible to use `ejs.render(dataAndOptions);` where you pass
everything in a single object. In that case, you'll end up with local variables
for all the passed options.
for all the passed options. However, be aware that your code could break if we
add an option with the same name as one of your data object's properties.
Therefore, we do not recommend using this shortcut.

## Options

Expand Down

0 comments on commit 3718a50

Please sign in to comment.