From 1c78ffd06d0a445da0f31f35e961505186484745 Mon Sep 17 00:00:00 2001 From: Konstantin Komelin Date: Wed, 20 Dec 2023 08:42:57 +0700 Subject: [PATCH] Simplified the Usage section of the Readme. --- README.md | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 10cd008..547ea21 100644 --- a/README.md +++ b/README.md @@ -39,23 +39,14 @@ Please note that DOMPurify library [doesn't follow Semantic Versioning](https:// ## Usage -1. Import the library: - ```javascript -// Import a necessary function in the ES6 way (recommended): -import { sanitize, isSupported } from "isomorphic-dompurify"; - -// or the entire module: -import DOMPurify from 'isomorphic-dompurify'; - -// or as a CommonJS module: -const DOMPurify = require('isomorphic-dompurify'); +// Import: +import { sanitize } from "isomorphic-dompurify"; ``` -2. Sanitize a string: - ```javascript -const clean = DOMPurify.sanitize(dirty); +// Sanitize: +const clean = sanitize(dirtyString); ``` ## Known Issues