Skip to content

Commit 423d21d

Browse files
committed
Added doc for the async rendering option
1 parent 40bb0ea commit 423d21d

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

README.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,15 +71,21 @@ Therefore, we do not recommend using this shortcut.
7171
- `delimiter` Character to use with angle brackets for open/close
7272
- `debug` Output generated function body
7373
- `strict` When set to `true`, generated function is in strict mode
74-
- `_with` Whether or not to use `with() {}` constructs. If `false` then the locals will be stored in the `locals` object. Set to `false` in strict mode.
75-
- `localsName` Name to use for the object storing local variables when not using `with` Defaults to `locals`
74+
- `_with` Whether or not to use `with() {}` constructs. If `false`
75+
then the locals will be stored in the `locals` object. Set to `false` in strict mode.
76+
- `localsName` Name to use for the object storing local variables when not using
77+
`with` Defaults to `locals`
7678
- `rmWhitespace` Remove all safe-to-remove whitespace, including leading
7779
and trailing whitespace. It also enables a safer version of `-%>` line
7880
slurping for all scriptlet tags (it does not strip new lines of tags in
7981
the middle of a line).
8082
- `escape` The escaping function used with `<%=` construct. It is
81-
used in rendering and is `.toString()`ed in the generation of client functions. (By default escapes XML).
82-
- `outputFunctionName` Set to a string (e.g., 'echo' or 'print') for a function to print output inside scriptlet tags.
83+
used in rendering and is `.toString()`ed in the generation of client functions.
84+
(By default escapes XML).
85+
- `outputFunctionName` Set to a string (e.g., 'echo' or 'print') for a function to print
86+
output inside scriptlet tags.
87+
- `async` When `true`, EJS will use an async function for rendering. (Depends
88+
on async/await support in the JS runtime.
8389

8490
This project uses [JSDoc](http://usejsdoc.org/). For the full public API
8591
documentation, clone the repository and run `npm run doc`. This will run JSDoc

0 commit comments

Comments
 (0)