diff --git a/README.md b/README.md index 826a4fa..45bf38b 100644 --- a/README.md +++ b/README.md @@ -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); ```