Преглед изворни кода

docs: Info to install @types/marked for ts projects (#2577)

azmy60 пре 2 година
родитељ
комит
0dcda393dd
2 измењених фајлова са 6 додато и 2 уклоњено
  1. 1 0
      README.md
  2. 5 2
      docs/INDEX.md

+ 1 - 0
README.md

@@ -47,6 +47,7 @@ npm install -g marked
 
 
 ```sh
 ```sh
 npm install marked
 npm install marked
+npm install @types/marked # For TypeScript projects
 ```
 ```
 
 
 ## Usage
 ## Usage

+ 5 - 2
docs/INDEX.md

@@ -21,8 +21,11 @@ These documentation pages are also rendered using marked 💯
 
 
 **CLI:** `npm install -g marked`
 **CLI:** `npm install -g marked`
 
 
-**In-browser:** `npm install marked`
-
+**In-browser:**
+```
+npm install marked
+npm install @types/marked # For TypeScript projects
+```
 <h2 id="usage">Usage</h2>
 <h2 id="usage">Usage</h2>
 
 
 ### Warning: 🚨 Marked does not [sanitize](/using_advanced#options) the output HTML. If you are processing potentially unsafe strings, it's important to filter for possible XSS attacks. Some filtering options include [DOMPurify](https://github.com/cure53/DOMPurify) (recommended), [js-xss](https://github.com/leizongmin/js-xss), [sanitize-html](https://github.com/apostrophecms/sanitize-html) and [insane](https://github.com/bevacqua/insane) on the *output* HTML! 🚨
 ### Warning: 🚨 Marked does not [sanitize](/using_advanced#options) the output HTML. If you are processing potentially unsafe strings, it's important to filter for possible XSS attacks. Some filtering options include [DOMPurify](https://github.com/cure53/DOMPurify) (recommended), [js-xss](https://github.com/leizongmin/js-xss), [sanitize-html](https://github.com/apostrophecms/sanitize-html) and [insane](https://github.com/bevacqua/insane) on the *output* HTML! 🚨