decode-html
Version:
decode html entities
30 lines (22 loc) • 559 B
Markdown
# decode-html
- decode html entities
- tiny function that replaces the html entities for the chars: "<", ">", "''", "&"
# install
```shell
npm install decode-html
```
# use
```javascript
var decode = require('decode-html');
console.log(decode('<div class="hidden">NON&SENSE's</div>'));
// -> '<div class="hidden">NON&SENSE\'s</div>'
```
> (opposite) encode function [encode-html](https://www.npmjs.com/encode-html)
# test
```shell
npm test
```
# license
MIT
# author
Andi Neck | [@andineck](https://twitter.com/andineck) | intesso