diff options
author | Marco Gonzalez <marcogrcr@gmail.com> | 2020-02-15 07:10:58 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-15 15:10:58 +0000 |
commit | 31a7bf2a22f7e9cfa3ec309cdff626a2ea228aab (patch) | |
tree | 13be574f54fe8e7c7e9696b1a81b292577838828 /README.md | |
parent | f0a29902acc24217881529449c7f9b8815896297 (diff) | |
download | tracifyjs-31a7bf2a22f7e9cfa3ec309cdff626a2ea228aab.tar.gz tracifyjs-31a7bf2a22f7e9cfa3ec309cdff626a2ea228aab.zip |
Updated "Output options" > "comments" in README.md (#3717)
Expanded the current documentation to include:
- What the value of `"some"` means based on `lib/output.js`.
- Information about the `Function` overload parameters and expected output.
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -848,8 +848,14 @@ can pass additional arguments that control the code output: statement. - `comments` (default `false`) -- pass `true` or `"all"` to preserve all - comments, `"some"` to preserve some comments, a regular expression string - (e.g. `/^!/`) or a function. + comments, `"some"` to preserve multi-line comments that contain `@cc_on`, + `@license`, or `@preserve` (case-insensitive), a regular expression string + (e.g. `/^!/`), or a function which returns `boolean`, e.g. + ```js + function(node, comment) { + return comment.value.indexOf("@type " + node.TYPE) >= 0; + } + ``` - `indent_level` (default `4`) |