Skip to content

Commit

Permalink
Merge pull request #415 from apostrophecms/2/import-readme
Browse files Browse the repository at this point in the history
Updates README import language
  • Loading branch information
abea authored Sep 16, 2020
2 parents e978b5f + 14d0b52 commit 5d15534
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 5d15534

Please sign in to comment.