1.0.4 • Published 11 months ago

html-to-pure-text v1.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

html2plaintext

Convert html-formatted text to plaintext

  • strip tags
  • reformat ordered/unordered lists
  • treat whitespace like a browser
  • decode html entities
  • parses img to image/图片

Use

var h2p = require('html2plaintext')

h2p('<p>Hello,\n   &amp; <em>how  are <a href="https://me.com">you</a>?</em></p>')
// => "Hello, & how are you?"

Install

npm install html2plaintext

Test

npm install
npm test

参考项目

https://github.com/kurttheviking/html2plaintext

1.0.4

11 months ago

1.0.2

2 years ago

1.0.3

2 years ago

1.0.1

2 years ago

1.0.0

3 years ago