Add warning for ejs.render(dataAndOptions)

This commit is contained in:
RyanZim
2016-04-18 16:01:28 -04:00
parent 2b388ca340
commit bc66935d28

View File

@@ -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