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