html2puretext

1.0.1 • Public • Published

html2plaintext

Known Vulnerabilities supported node versions license: MIT npm version npm

html2puretext is a robust library designed for converting HTML content into clean, readable plaintext. This utility simplifies the transformation process by efficiently handling various HTML elements, including lists, styles, and scripts.

Getting started

Convert html-formatted text to plaintext

  • strip tags
  • reformat ordered/unordered lists
  • treat whitespace like a browser
  • decode html entities

Installation

This package can be installed using npm

npm install html2puretext

or, yarn

yarn add html2puretext

Usage

var h2p = require('html2puretext')

h2p('<p>Hello,\n   &amp; <em>my name is <a href="https://github.com/vijay75740/html2puretext">Vijay</a></em></p>')
// => "Hello, & my name is Vijay"

Disclaimer

This package uses html code convert to normal text.

Issues

If any issues are found, they can be reported here.

License

This project is licensed under the MIT license.

Package Sidebar

Install

npm i html2puretext

Weekly Downloads

2

Version

1.0.1

License

MIT

Unpacked Size

5.33 kB

Total Files

4

Last publish

Collaborators

  • vijaylunagariya