From f78d31c353ca1ea1404ae3d5643632721bc7dffe Mon Sep 17 00:00:00 2001 From: Filip Stanis Date: Thu, 27 Dec 2018 14:30:13 +0000 Subject: [PATCH] Update README --- README.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 44abb3c..1c6aa3a 100644 --- a/README.md +++ b/README.md @@ -18,17 +18,21 @@ npm install posthtml-uglify --save ## Usage ```js -var posthtml = require('posthtml'); -var uglify = require('posthtml-uglify'); +const posthtml = require('posthtml'); +const uglify = require('posthtml-uglify'); posthtml() - .use(uglify({ whitelist: '.bar' })) + .use(uglify({ whitelist: ['.bar'] })) .process('
baz
') - .then(function(result) { + .then((result) => { console.log(result.html); //=> '
baz
' }); ``` +### Options + +- **whitelist** (Array): list of selectors that should not be rewritten by this plugin. For example, an id or class that is used by JavaScript code. + ## Contributing 1. Fork it