We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 41b7b25 commit c824343Copy full SHA for c824343
readme.md
@@ -22,9 +22,10 @@ $ npm install posthtml-parser
22
</a>
23
```
24
```js
25
-const parser = require('posthtml-parser')
26
-const fs = require('fs')
27
-const html = fs.readFileSync('path/to/input.html').toString()
+import parser from 'posthtml-parser'
+import fs from 'fs'
+
28
+const html = fs.readFileSync('path/to/input.html', 'utf-8')
29
30
console.log(parser(html)) // Logs a PostHTML AST
31
0 commit comments