Skip to content

Commit c824343

Browse files
committedFeb 4, 2021
docs: default import description
1 parent 41b7b25 commit c824343

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed
 

‎readme.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,10 @@ $ npm install posthtml-parser
2222
</a>
2323
```
2424
```js
25-
const parser = require('posthtml-parser')
26-
const fs = require('fs')
27-
const html = fs.readFileSync('path/to/input.html').toString()
25+
import parser from 'posthtml-parser'
26+
import fs from 'fs'
27+
28+
const html = fs.readFileSync('path/to/input.html', 'utf-8')
2829

2930
console.log(parser(html)) // Logs a PostHTML AST
3031
```

0 commit comments

Comments
 (0)
Please sign in to comment.