1.1.1 • Published 5 years ago

parse-html-text-content v1.1.1

Weekly downloads
41
License
ISC
Repository
github
Last release
5 years ago

ParseHtmlTextContent

parse the textContent of all elements of the html text without having to create a DOM from the html

Uses regex to filter out text between & including chars: <, > If the html text is has those characters encoded, this should work smoothly; otherwise, it would parse the wrong values. After parsing, it also decodes the html entities.

Install

npm i -S parse-html-text-content

Usage

const parseTextContent = require('parse-html-text-content');

const htmlText = '<p>hello world</p>';
console.log(parseTextContent(htmlText)); // hello world
1.1.1

5 years ago

1.1.0

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago