Package Exports
- html2plaintext
- html2plaintext/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (html2plaintext) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
html2plaintext
Convert html-formatted text to plaintext
- strip tags
- reformat ordered/unordered lists
- treat whitespace like a browser
- decode html entities
Use
var h2p = require('html2plaintext')
h2p('<p>Hello,\n & <em>how are <a href="https://me.com">you</a>?</em></p>')
// => "Hello, & how are you?"Install
npm install html2plaintextTest
npm install
npm test