Skip to content

Commit

Permalink
Updates README import language
Browse files Browse the repository at this point in the history
  • Loading branch information
abea committed Sep 16, 2020
1 parent e978b5f commit 14d0b52
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,19 @@ Install module from console:
npm install sanitize-html
```

Use it in your node app:
Import the module:

```js
```bash
// In ES modules
import sanitizeHtml from 'sanitize-html';

// Or in CommonJS
const sanitizeHtml = require('sanitize-html');
```

Use it in your JavaScript app:

```js
const dirty = 'some really tacky HTML';
const clean = sanitizeHtml(dirty);
```
Expand Down

0 comments on commit 14d0b52

Please sign in to comment.